lovesh / signature-schemes

Rust library for BLS signatures, MuSig, PS signatures
Apache License 2.0
66 stars 20 forks source link

Naming a function new and not returning Self is unidiomatic #11

Closed JayPavlina closed 4 years ago

JayPavlina commented 4 years ago

There are a few functions named new, but they do not return Self. One example is AggregatedVerKey::new(). This is unidiomatic and should be changed since it will confuse people. I would recommend running cargo clippy on the crate to help with things like this.

lovesh commented 4 years ago

Yes. That was lazy on my part. I had a struct AggregatedVerKey when i wrote this but recently realized that it is same as a VerKey so got rid of the struct (Same case for MultiSignature. Should have changed the name to from_verkeys or similar. Thanks for noticing.

lovesh commented 4 years ago

Fixed here https://github.com/lovesh/signature-schemes/commit/a3dc88356c031fb98f8374655ffb1a235518c2ba