rust-bitcoin / rust-secp256k1

Rust language bindings for Bitcoin secp256k1 library.
Creative Commons Zero v1.0 Universal
335 stars 249 forks source link

Macro with same name in rust-bitcoin is quite different #696

Open tcharding opened 1 month ago

tcharding commented 1 month ago

In rust-bitcoin we have a macro name the same as one here impl_array_newtype but they differ substantially.

Should they be the same?

The one in rust-bitcoin was patched in https://github.com/rust-bitcoin/rust-bitcoin/pull/2585

apoelstra commented 1 month ago

Yeah, these should be the same.

It's tempting to move the macro into internals but right now hashes does not have an internals dep. So maybe ok to continue having the macro be copy/pasted. But maybe we should have a lint check to verify that the code is identical?

tcharding commented 1 month ago

The macro is in internals, and I just realized there are two of them in secp, one in each crate.

Oh, did you mean secp256k1 doesn't have a dependency on internals?

apoelstra commented 1 month ago

Oh, yeah, I was confusing hashes (which has yet another macro that serves a similar purpose..) with secp256k1.