Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Add missing Clone trait to code #73

Merged
merged 1 commit into from
Aug 4, 2022
Merged

Conversation

overcat
Copy link
Contributor

@overcat overcat commented Aug 4, 2022

Clone trait is required, without it the code cannot be compiled.

error[E0277]: the trait bound `RawVal: From<&Name>` is not satisfied
  --> src/lib.rs:23:1
   |
23 | #[contractimpl(export_if = "export")]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<&Name>` is not implemented for `RawVal`
   |
   = help: the following other types implement trait `From<T>`:
             <RawVal as From<&()>>
             <RawVal as From<&ScStatus>>
             <RawVal as From<&i32>>
             <RawVal as From<&u32>>
             <RawVal as From<()>>
             <RawVal as From<Account>>
             <RawVal as From<FixedBinary<N>>>
             <RawVal as From<ScStatus>>
           and 19 others
   = note: required because of the requirements on the impl of `Into<RawVal>` for `&Name`
   = note: required because of the requirements on the impl of `IntoVal<Env, RawVal>` for `&Name`
   = note: this error originates in the attribute macro `contractimpl` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0277`.
error: could not compile `custom-type` due to previous error

I think this might be confusing for beginers, but if this is intentional, please feel free to close this PR

Clone trait is required, without it the code cannot be compiled.
@jonjove jonjove merged commit 41e71e8 into stellar-deprecated:main Aug 4, 2022
@overcat overcat deleted the patch-1 branch August 4, 2022 14:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants