You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You'll notice zcash abandoned the generics in the equally messy old interface. You'd still avoid the preparation time by cloning the G2Prepareds, but we never modify G2Prepared so idiomatic rust would allow borrows here.
Could we borrow but retain the Into somehow? I suspect maybe..
Hm another thing I realized is that the current API means that multi_miller_loop must accept items all of the same concrete type, which means I can't do something like E::multi_miller_loop([a, b], [c, d_prepared])
Afaik we do not have
&G2Prepared: Into<G2Prepared>
sensibly, so every invocation requires duplicating theG2Prepared
, like 16kb or more.You'll notice zcash abandoned the generics in the equally messy old interface. You'd still avoid the preparation time by cloning the
G2Prepared
s, but we never modify G2Prepared so idiomatic rust would allow borrows here.Could we borrow but retain the
Into
somehow? I suspect maybe..It's possible rustc winds up confused by the multiple trait layers here, under some uses, not sure.
As an aside, rustc won't let associated types remove the
impl Borrow
flexibility andInto<Cow<..>>
breaks oddly. It's also plausible rust-lang/rfcs#3382 helps somehow. I'm most hopeful for the above however.The text was updated successfully, but these errors were encountered: