arkworks-rs/snark

Make `ConstraintSynthesizer::generate_constraints` not consume `self` by value

Pratyush opened this issue · 5 comments

Make `ConstraintSynthesizer::generate_constraints` not consume `self` by value

Does it mean that we just change self to &self?

My first attempt shows that this seems good: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=0dcc9126df1c78347ad34fc5238617a4

yeah, it's mostly just an issue with updating everything downstream =)

@weikengchen Now that cloning ConstraintSystemRef is cheap, is this still an issue?

Nope? Because the one that may need cloning is ConstraintSynthesizer rather than ConstraintSystemRef.

Oh oops, misread the title lol. Ok, will address this in my current set of changes.