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

spacesuit: fix the trait bound for the RngCore #89

Closed
wants to merge 4 commits into from
Closed

Conversation

oleganza
Copy link
Contributor

@oleganza oleganza commented Feb 15, 2019

This fixes the issue triggered by the recent curve25519-dalek update to v1.1.

This is the issue:

error[E0382]: use of moved value: `rng`
   --> src/value.rs:161:70
    |
160 |         let (q_commit, q_var) = prover.commit(self.q.into(), Scalar::random(rng));
    |                                                                             --- value moved here
161 |         let (f_commit, f_var) = prover.commit(self.f, Scalar::random(rng));
    |                                                                      ^^^ value used here after move
    |
    = note: move occurs because `rng` has type `&mut R`, which does not implement the `Copy` trait

An issue on curve25519-dalek: dalek-cryptography/curve25519-dalek#232

Copy link
Contributor

@vickiniu vickiniu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@oleganza
Copy link
Contributor Author

oleganza commented Feb 15, 2019

Henry published a v1.1.3 that reverts the API change that broke spacesuit. We should review the rng-using APIs in a more principled manner. For now just do cargo update to pick up curve25519-dalek v1.1.3.

@oleganza oleganza closed this Feb 15, 2019
@oleganza oleganza deleted the oleg/rngcore branch February 20, 2019 00:15
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