Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codetable: fix build for blake2s and blake2b features #348

Merged
merged 1 commit into from
Oct 30, 2023

Commits on Oct 30, 2023

  1. codetable: fix build for blake2s and blake2b features

    In the refactor where each hasher was moved to a separate feature, the
    conditional compilation of derive_write! was written such that enabling
    only blake2 hashing will result in compilation errors:
    
        error: cannot find macro `derive_write` in this scope
          --> /home/cyphar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/multihash-codetable-0.1.0/src/hasher_impl.rs:59:9
           |
        59 |         derive_write!($name);
           |         ^^^^^^^^^^^^
        ...
        65 |     derive_hasher_blake!(blake2b_simd, Blake2bHasher);
           |     ------------------------------------------------- in this macro invocation
           |
           = note: this error originates in the macro `derive_hasher_blake` (in Nightly builds, run with -Z macro-backtrace for more info)
    
        error: could not compile `multihash-codetable` (lib) due to previous error
    
    Fixes: 954e523 ("refactor!: split crates into multiple to isolate breaking changes")
    Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
    cyphar committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    c977fcf View commit details
    Browse the repository at this point in the history