rust-secp256k1-unsafe-fast/src
Andrew Poelstra d5065cc771
Merge rust-bitcoin/rust-secp256k1#518: Make comparison functions stable
9850550734 Move AsRef impl block next to Index (Tobin C. Harding)
4d42e8e906 Derive Copy and Clone (Tobin C. Harding)
b38ae97eaf Implement stable comparison functionality (Tobin C. Harding)
630fc1fcb6 Remove len and is_empty from impl_array_newtype macros (Tobin C. Harding)
9788b6df88 Remove leading colons from impl_array_newtype methods (Tobin C. Harding)
2bb08c21e5 Remove as_[mut_]ptr from impl_array_newtype macros (Tobin C. Harding)
3e28070187 Duplicate impl_array_newtype (Tobin C. Harding)
635890322a Add newline to end of file (Tobin C. Harding)

Pull request description:

  Supersedes #515

  The primary aim of this PR is to fix the fact that we currently implement various comparison traits (`Ord`, `PartialEq`) by comparing the inner byte arrays. These bytes are meant to be opaque and are not guaranteed across versions of `libsecp256k1`.

  This PR is a bit involved because I had to detangle all the various types (across both `secp256k1` and `secp256k1-sys`) that use the `impl_array_newtype` macro.

  - Patch 1: is trivial cleanup
  - Patch 2: Step one of the PR is duplicating the macro into both crates so we can tease them apart.
  - Patch 3-5: Are cleanup of the now duplicated `impl_array_newtype` macros
  - Patch 6: Is the meat and potatoes
  - Patch 7,8: Further minor clean ups to the macro

  I had a lot of fun with this PR, I hope you enjoy it too.

  Fix: #463

ACKs for top commit:
  apoelstra:
    ACK 9850550734

Tree-SHA512: 160381e53972ff882ceb1d2d47bac56a7301a2d13bfe75d3f6ff658ab2c6fbe516ad856587c4d23f98524205918ca1a5f9b737e35c23c7a01b476c92d8d1792f
2022-11-21 14:58:50 +00:00
..
ecdsa Merge rust-bitcoin/rust-secp256k1#518: Make comparison functions stable 2022-11-21 14:58:50 +00:00
constants.rs Prepare codebase for formatting 2022-11-16 10:56:25 +11:00
context.rs Fix feature gating 2022-11-18 10:14:41 +11:00
ecdh.rs Merge rust-bitcoin/rust-secp256k1#518: Make comparison functions stable 2022-11-21 14:58:50 +00:00
key.rs Merge rust-bitcoin/rust-secp256k1#518: Make comparison functions stable 2022-11-21 14:58:50 +00:00
lib.rs Merge rust-bitcoin/rust-secp256k1#518: Make comparison functions stable 2022-11-21 14:58:50 +00:00
macros.rs Move AsRef impl block next to Index 2022-11-18 10:57:32 +11:00
scalar.rs Fix feature gating 2022-11-18 10:14:41 +11:00
schnorr.rs Merge rust-bitcoin/rust-secp256k1#518: Make comparison functions stable 2022-11-21 14:58:50 +00:00
secret.rs Merge rust-bitcoin/rust-secp256k1#499: Introduce `rustfmt` 2022-11-17 15:00:00 +00:00
serde_util.rs Run cargo fmt 2022-11-16 11:06:12 +11:00