Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ompose_extrinsic_offline fails for payloads that don't implement the copy trait #35

Closed
brenzi opened this issue Oct 22, 2019 · 0 comments

Comments

@brenzi
Copy link
Contributor

brenzi commented Oct 22, 2019

if the call enum contains a value which doesn't implement copy trait, rustc complains:

error[E0382]: use of moved value: `witnesses`
   --> src/lib.rs:246:87
    |
241 |             let witnesses = witnesses.expect("witnesses are specified");
    |                 --------- move occurs because `witnesses` has type `std::vec::Vec<encointer_node_runtime::encointer_ceremonies::Witness<sr_primitives::AnySignature, substrate_primitives::sr25519::Public>>`, which does not implement the `Copy` trait
...
246 |                 Call::EncointerCeremonies(EncointerCeremoniesCall::register_witnesses(witnesses)),
    |                                                                                       ^^^^^^^^^ value moved here, in previous iteration of loop

The error message is misleading, because there is no loop: due to: rust-lang/rust/issues/46099

@brenzi brenzi closed this as completed in 9d10c6a Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant