-
Notifications
You must be signed in to change notification settings - Fork 217
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
Make closure of challenge phase FnOnce. #276
Conversation
Seems like the CI fails on the Rust version (which should be 1.35 for this to work). |
25cfd96
to
79a88ec
Compare
The new build failure is because of the bunch of recent deprecations in merlin. |
Hi, those deprecations were fixed in the |
Is |
Yep, it's still being used, it's just that those changes were included as part of a PR that added additional validation to the rangeproof code, so they were put into the |
Ok, fair! So, would you mind porting those deprecation fixes to develop then, then I'll rebase. |
Currently in-progress with #277! |
I've rebased this over |
Looks like I managed to shorten the lifetime. I added a test that would fail before and succeed after the patch. It does however mean that all EDIT: feel free to cherry-pick whichever of the patches you like already! |
Does non-static lifetime work well with multiple calls to |
That's an exciting update, thanks! |
It should! I currently have no use for it myself, but I may soon have. If it doesn't work out, feel free to add a test case and I'll take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments wrt. to the new lifetimes; I'd like some second opinions!
I dropped the non- |
It allows for the challenge phase to accept closures that take some more context, e.g. moving non-Clone values in the challenge closure. This works in stable since Rust 1.35; cfr. rust-lang/rust#28796. This closes issue dalek-cryptography#244.
It allows for the challenge phase to accept closures that take some more
context, e.g. moving non-Clone values in the challenge closure.
This works in stable since Rust 1.35; cfr.
rust-lang/rust#28796.
This closes issue #244.
In other news: I'm not yet happy with theCfr #323'static
bound on the closures. Since I'm not yet worried about that kind of performance (just hacking around currently), I'm not going to fight the borrow checker there, yet.