LLFourn / secp256kfun

A pure-rust secp256k1 library optimised for fun
BSD Zero Clause License
100 stars 28 forks source link

Do not rely on inference behavior for `Scalar::from_*` and `Point::from_*` #156

Closed compiler-errors closed 1 year ago

compiler-errors commented 1 year ago

rust-lang/rust#110100 changes the inference behavior of the rust compiler subtly, which breaks the compilation of your crate.

I attempted to remediate this by providing additional type hints to the compiler, but I'm not actually sure about these choices of Secret (or if they should be Public) since I know nothing about cryptography.

LLFourn commented 1 year ago

Thanks for informing me of this!

LLFourn commented 1 year ago

@compiler-errors would you mind checking that the changes I've made to this PR still compile with https://github.com/rust-lang/rust/pull/110100? Cheers.

compiler-errors commented 1 year ago

Whoops, @LLFourn yes I tested and these new changes work fine.