From 6be06a691c859b3a5243adf774dc71ef68baab25 Mon Sep 17 00:00:00 2001 From: Tom Kaitchuck Date: Tue, 24 Oct 2023 18:14:29 -0700 Subject: [PATCH 1/9] Update zerocopy to 0.7.14 for new license (#177) (#178) Signed-off-by: Tom Kaitchuck --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b340522..aea0d44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ahash" -version = "0.8.5" +version = "0.8.6" authors = ["Tom Kaitchuck "] license = "MIT OR Apache-2.0" description = "A non-cryptographic hash function using AES-NI for high performance" @@ -80,7 +80,7 @@ serde = { version = "1.0.117", optional = true } cfg-if = "1.0" atomic-polyfill = { version="1.0.1", optional=true} getrandom = { version = "0.2.7", optional = true } -zerocopy = { version = "0.7.0", default-features = false, features = ["simd"] } +zerocopy = { version = "0.7.14", default-features = false, features = ["simd"] } [target.'cfg(not(all(target_arch = "arm", target_os = "none")))'.dependencies] once_cell = { version = "1.13.1", default-features = false, features = ["unstable", "alloc"] } From 96d5524a0ac1d730160065f8e3118563f35de0e8 Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Tue, 2 Jan 2024 18:07:04 +0100 Subject: [PATCH 2/9] Fix some typos (#192) --- compare/readme.md | 4 ++-- src/hash_quality_test.rs | 24 ++++++++++++------------ src/lib.rs | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/compare/readme.md b/compare/readme.md index 58146e5..e7a6c53 100644 --- a/compare/readme.md +++ b/compare/readme.md @@ -25,7 +25,7 @@ Even the fallback algorithm is in the top 5 in terms of throughput, beating out aHash is the fastest non-trivial hasher implementation in Rust. Below is a comparison with 10 other popular hashing algorithms. -![Hasher perfromance](https://docs.google.com/spreadsheets/d/e/2PACX-1vSK7Li2nS-Bur9arAYF9IfT37MP-ohAe1v19lZu5fd9MajI1fSveLAQZyEie4Ea9k5-SWHTff7nL2DW/pubchart?oid=1323618938&format=image) +![Hasher performance](https://docs.google.com/spreadsheets/d/e/2PACX-1vSK7Li2nS-Bur9arAYF9IfT37MP-ohAe1v19lZu5fd9MajI1fSveLAQZyEie4Ea9k5-SWHTff7nL2DW/pubchart?oid=1323618938&format=image) ## DOS resistance @@ -120,4 +120,4 @@ Similarly, wyHash is targeted at hashmaps. WyHash is quite fast, but is not DOS There are fixed strings which when encountered caused the internal state to reset. This makes wyHash trivial to attack. -AHash outperforms wyHash across all input sizes, regardless of which CPU instructions are available. \ No newline at end of file +AHash outperforms wyHash across all input sizes, regardless of which CPU instructions are available. diff --git a/src/hash_quality_test.rs b/src/hash_quality_test.rs index 4f6091a..43f2aeb 100644 --- a/src/hash_quality_test.rs +++ b/src/hash_quality_test.rs @@ -108,13 +108,13 @@ fn test_keys_change_output(constructor: impl Fn(u128, u128) -> T) { fn test_input_affect_every_byte(constructor: impl Fn(u128, u128) -> T) { let base = hash_with(&0, constructor(0, 0)); for shift in 0..16 { - let mut alternitives = vec![]; + let mut alternatives = vec![]; for v in 0..256 { let input = (v as u128) << (shift * 8); let hasher = constructor(0, 0); - alternitives.push(hash_with(&input, hasher)); + alternatives.push(hash_with(&input, hasher)); } - assert_each_byte_differs(shift, base, alternitives); + assert_each_byte_differs(shift, base, alternatives); } } @@ -122,26 +122,26 @@ fn test_input_affect_every_byte(constructor: impl Fn(u128, u128) -> T fn test_keys_affect_every_byte(item: H, constructor: impl Fn(u128, u128) -> T) { let base = hash_with(&item, constructor(0, 0)); for shift in 0..16 { - let mut alternitives1 = vec![]; - let mut alternitives2 = vec![]; + let mut alternatives1 = vec![]; + let mut alternatives2 = vec![]; for v in 0..256 { let input = (v as u128) << (shift * 8); let hasher1 = constructor(input, 0); let hasher2 = constructor(0, input); let h1 = hash_with(&item, hasher1); let h2 = hash_with(&item, hasher2); - alternitives1.push(h1); - alternitives2.push(h2); + alternatives1.push(h1); + alternatives2.push(h2); } - assert_each_byte_differs(shift, base, alternitives1); - assert_each_byte_differs(shift, base, alternitives2); + assert_each_byte_differs(shift, base, alternatives1); + assert_each_byte_differs(shift, base, alternatives2); } } -fn assert_each_byte_differs(num: u64, base: u64, alternitives: Vec) { +fn assert_each_byte_differs(num: u64, base: u64, alternatives: Vec) { let mut changed_bits = 0_u64; - for alternitive in alternitives { - changed_bits |= base ^ alternitive + for alternative in alternatives { + changed_bits |= base ^ alternative } assert_eq!( core::u64::MAX, diff --git a/src/lib.rs b/src/lib.rs index 2086513..500f430 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -77,7 +77,7 @@ use ahash::AHashMap; let mut map: AHashMap = AHashMap::new(); map.insert(12, 34); ``` -This avoids the need to type "RandomState". (For convience `From`, `Into`, and `Deref` are provided). +This avoids the need to type "RandomState". (For convenience `From`, `Into`, and `Deref` are provided). # Aliases From c7e8a125e68df42786cae1f41b88b8da76efaffc Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Tue, 2 Jan 2024 18:07:59 +0100 Subject: [PATCH 3/9] Update GitHub Actions CI (#193) The following updates are performed: * update actions/checkout to v4 * replace unmaintained actions-rs/toolchain by dtolnay/rust-toolchain * replace unmaintained actions-rs/cargo by direct invocation of cargo --- .github/workflows/rust.yml | 156 +++++++++++-------------------------- 1 file changed, 47 insertions(+), 109 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1d440a5..6907df1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -6,191 +6,129 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install latest stable - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: stable components: clippy - name: check nostd - uses: actions-rs/cargo@v1 - with: - command: check - args: --no-default-features + run: cargo check --no-default-features - name: test nostd - uses: actions-rs/cargo@v1 - with: - command: test - args: --no-default-features + run: cargo test --no-default-features - name: check constrandom - uses: actions-rs/cargo@v1 - with: - command: check - args: --no-default-features --features compile-time-rng + run: cargo check --no-default-features --features compile-time-rng - name: test constrandom - uses: actions-rs/cargo@v1 - with: - command: test - args: --no-default-features --features compile-time-rng + run: cargo test --no-default-features --features compile-time-rng - name: check fixed-seed - uses: actions-rs/cargo@v1 - with: - command: check - args: --no-default-features --features std + run: cargo check --no-default-features --features std - name: check - uses: actions-rs/cargo@v1 - with: - command: check + run: cargo check - name: test - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test nightly: name: nightly runs-on: ubuntu-latest env: RUSTFLAGS: -C target-cpu=native steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install latest nightly - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: nightly - override: true components: clippy - name: check nightly - uses: actions-rs/cargo@v1 - with: - command: check - args: -Z msrv-policy + run: cargo check -Z msrv-policy - name: test nightly - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test - name: check serde - uses: actions-rs/cargo@v1 - with: - command: check - args: --features serde + run: cargo check --features serde - name: test serde - uses: actions-rs/cargo@v1 - with: - command: test - args: --features serde + run: cargo test --features serde linux_arm7: name: Linux ARMv7 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: toolchain: stable - target: armv7-unknown-linux-gnueabihf - - uses: actions-rs/cargo@v1 - with: - command: check - args: --target armv7-unknown-linux-gnueabihf + targets: armv7-unknown-linux-gnueabihf + - run: cargo check --target armv7-unknown-linux-gnueabihf aarch64-apple-darwin: name: Aarch64 Apple Darwin runs-on: macos-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: toolchain: stable - target: aarch64-apple-darwin - - uses: actions-rs/cargo@v1 - with: - command: check - args: --target aarch64-apple-darwin + targets: aarch64-apple-darwin + - run: cargo check --target aarch64-apple-darwin i686-unknown-linux-gnu: name: Linux i686 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: toolchain: stable - target: i686-unknown-linux-gnu + targets: i686-unknown-linux-gnu - name: Install cross compile tools run: sudo apt-get install -y gcc-multilib libc6-i386 libc6-dev-i386 - - uses: actions-rs/cargo@v1 - with: - command: check - args: --target i686-unknown-linux-gnu - - uses: actions-rs/cargo@v1 - with: - command: test - args: --target i686-unknown-linux-gnu + - run: cargo check --target i686-unknown-linux-gnu + - run: cargo test --target i686-unknown-linux-gnu x86_64-unknown-linux-gnu: name: Linux x86_64 - nightly runs-on: ubuntu-latest env: RUSTFLAGS: -C target-cpu=skylake -C target-feature=+aes steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: toolchain: nightly - override: true - target: x86_64-unknown-linux-gnu - - uses: actions-rs/cargo@v1 - with: - command: check - args: --target x86_64-unknown-linux-gnu - - uses: actions-rs/cargo@v1 - with: - command: test - args: --target x86_64-unknown-linux-gnu + targets: x86_64-unknown-linux-gnu + - run: cargo check --target x86_64-unknown-linux-gnu + - run: cargo test --target x86_64-unknown-linux-gnu thumbv6m: name: thumbv6m runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: toolchain: stable - target: thumbv6m-none-eabi - - uses: actions-rs/cargo@v1 - with: - command: check - args: --target thumbv6m-none-eabi --no-default-features + targets: thumbv6m-none-eabi + - run: cargo check --target thumbv6m-none-eabi --no-default-features wasm32-unknown-unknown: name: wasm runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: toolchain: stable - target: wasm32-unknown-unknown - - uses: actions-rs/cargo@v1 - with: - command: check - args: --target wasm32-unknown-unknown --no-default-features + targets: wasm32-unknown-unknown + - run: cargo check --target wasm32-unknown-unknown --no-default-features msrv: name: MSRV runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install 1.60.0 - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: 1.60.0 - name: check - uses: actions-rs/cargo@v1 - with: - command: check + run: cargo check no_std: name: no-std build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: toolchain: nightly - override: true - - uses: actions-rs/cargo@v1 - with: - command: build - args: --manifest-path=no_std_test/Cargo.toml + - run: cargo build --manifest-path=no_std_test/Cargo.toml From 6caa72776481067c7cb73e5497df162448e73440 Mon Sep 17 00:00:00 2001 From: Tom Kaitchuck Date: Sat, 10 Feb 2024 15:52:54 -0800 Subject: [PATCH 4/9] Add test for key ref invariance Signed-off-by: Tom Kaitchuck --- tests/map_tests.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/map_tests.rs b/tests/map_tests.rs index 8d798a0..bdf37d8 100644 --- a/tests/map_tests.rs +++ b/tests/map_tests.rs @@ -200,6 +200,32 @@ fn test_ahash_alias_set_construction() { set.insert(1); } + +#[cfg(feature = "std")] +#[test] +fn test_key_ref() { + let mut map = ahash::HashMap::default(); + map.insert(1, "test"); + assert_eq!(Some((1, "test")), map.remove_entry(&1)); + + let mut map = ahash::HashMap::default(); + map.insert(&1, "test"); + assert_eq!(Some((&1, "test")), map.remove_entry(&&1)); + + let mut m = ahash::HashSet::>::default(); + m.insert(Box::from("hello".to_string())); + assert!(m.contains(&"hello".to_string())); + + let mut m = ahash::HashSet::::default(); + m.insert("hello".to_string()); + assert!(m.contains("hello")); + + let mut m = ahash::HashSet::>::default(); + m.insert(Box::from(&b"hello"[..])); + assert!(m.contains(&b"hello"[..])); +} + + fn ahash_vec(b: &Vec) -> u64 { let mut total: u64 = 0; for item in b { From 2c22a60f4db15d14c0cae7fc90a732def8112847 Mon Sep 17 00:00:00 2001 From: Jeffrey Vo Date: Sun, 11 Feb 2024 15:52:31 +1100 Subject: [PATCH 5/9] Bump rust-version to 1.72.0 (#196) * Bump rust-version to 1.72.0 * Bump rust version in MSRC CI check --- .github/workflows/rust.yml | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6907df1..327397e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -117,10 +117,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Install 1.60.0 + - name: Install 1.72.0 uses: dtolnay/rust-toolchain@master with: - toolchain: 1.60.0 + toolchain: 1.72.0 - name: check run: cargo check no_std: diff --git a/Cargo.toml b/Cargo.toml index 7f2901f..2d65614 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ edition = "2018" readme = "README.md" build = "./build.rs" exclude = ["/smhasher", "/benchmark_tools"] -rust-version = "1.60.0" +rust-version = "1.72.0" [lib] name = "ahash" From a0b012a0bf86d3ae200fc13858329d10fc3b5d14 Mon Sep 17 00:00:00 2001 From: Tom Kaitchuck Date: Sat, 10 Feb 2024 21:06:48 -0800 Subject: [PATCH 6/9] Increase the MSRV presubmit checks to include multiple architectures (#197) Increase the MSRV presubmit checks to include multiple architectures Signed-off-by: Tom Kaitchuck --- .github/workflows/rust.yml | 48 +++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 327397e..7e28cda 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -56,6 +56,12 @@ jobs: toolchain: stable targets: armv7-unknown-linux-gnueabihf - run: cargo check --target armv7-unknown-linux-gnueabihf + - name: Install 1.72.0 + uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.72.0 + targets: armv7-unknown-linux-gnueabihf + - run: cargo +1.72.0 check --target armv7-unknown-linux-gnueabihf aarch64-apple-darwin: name: Aarch64 Apple Darwin runs-on: macos-latest @@ -66,6 +72,14 @@ jobs: toolchain: stable targets: aarch64-apple-darwin - run: cargo check --target aarch64-apple-darwin + - run: cargo test + - run: cargo test --no-default-features --features compile-time-rng + - name: Install 1.72.0 + uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.72.0 + targets: aarch64-apple-darwin + - run: cargo +1.72.0 check --target aarch64-apple-darwin i686-unknown-linux-gnu: name: Linux i686 runs-on: ubuntu-latest @@ -79,8 +93,18 @@ jobs: run: sudo apt-get install -y gcc-multilib libc6-i386 libc6-dev-i386 - run: cargo check --target i686-unknown-linux-gnu - run: cargo test --target i686-unknown-linux-gnu + - name: check constrandom + run: cargo check --no-default-features --features compile-time-rng --target i686-unknown-linux-gnu + - name: Install 1.72.0 + uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.72.0 + targets: i686-unknown-linux-gnu + - run: cargo +1.72.0 check --target i686-unknown-linux-gnu + - name: check constrandom + run: cargo +1.72.0 check --no-default-features --features compile-time-rng --target i686-unknown-linux-gnu x86_64-unknown-linux-gnu: - name: Linux x86_64 - nightly + name: Linux x86_64 runs-on: ubuntu-latest env: RUSTFLAGS: -C target-cpu=skylake -C target-feature=+aes @@ -92,6 +116,15 @@ jobs: targets: x86_64-unknown-linux-gnu - run: cargo check --target x86_64-unknown-linux-gnu - run: cargo test --target x86_64-unknown-linux-gnu + - name: check constrandom + run: cargo check --no-default-features --features compile-time-rng --target x86_64-unknown-linux-gnu + - name: Install 1.72.0 + uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.72.0 + - run: cargo +1.72.0 check --target x86_64-unknown-linux-gnu + - name: check constrandom + run: cargo +1.72.0 check --no-default-features --features compile-time-rng --target x86_64-unknown-linux-gnu thumbv6m: name: thumbv6m runs-on: ubuntu-latest @@ -112,17 +145,6 @@ jobs: toolchain: stable targets: wasm32-unknown-unknown - run: cargo check --target wasm32-unknown-unknown --no-default-features - msrv: - name: MSRV - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install 1.72.0 - uses: dtolnay/rust-toolchain@master - with: - toolchain: 1.72.0 - - name: check - run: cargo check no_std: name: no-std build runs-on: ubuntu-latest @@ -131,4 +153,4 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: nightly - - run: cargo build --manifest-path=no_std_test/Cargo.toml + - run: cargo build --manifest-path=no_std_test/Cargo.toml \ No newline at end of file From 669de234e4c7653ff814bed8244cb4d48356c594 Mon Sep 17 00:00:00 2001 From: Tom Kaitchuck Date: Sat, 10 Feb 2024 21:45:22 -0800 Subject: [PATCH 7/9] Bump version to 0.8.8 Signed-off-by: Tom Kaitchuck --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 2d65614..32b7f0f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ahash" -version = "0.8.7" +version = "0.8.8" authors = ["Tom Kaitchuck "] license = "MIT OR Apache-2.0" description = "A non-cryptographic hash function using AES-NI for high performance" From 2140bf36074b67c09162e1f9e9e76a6c4546e4f1 Mon Sep 17 00:00:00 2001 From: Tom Kaitchuck Date: Sat, 17 Feb 2024 00:45:01 -0800 Subject: [PATCH 8/9] Reduce scope of ARM changes to avoid MSRV update Signed-off-by: Tom Kaitchuck --- Cargo.toml | 2 +- src/lib.rs | 2 +- src/operations.rs | 4 ++-- src/random_state.rs | 2 +- tests/bench.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 32b7f0f..01faf1e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ edition = "2018" readme = "README.md" build = "./build.rs" exclude = ["/smhasher", "/benchmark_tools"] -rust-version = "1.72.0" +rust-version = "1.60.0" [lib] name = "ahash" diff --git a/src/lib.rs b/src/lib.rs index 500f430..653c3bc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -108,7 +108,7 @@ mod fallback_hash; cfg_if::cfg_if! { if #[cfg(any( all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)), - all(target_arch = "aarch64", target_feature = "aes", not(miri)), + all(feature = "nightly-arm-aes", target_arch = "aarch64", target_feature = "aes", not(miri)), all(feature = "nightly-arm-aes", target_arch = "arm", target_feature = "aes", not(miri)), ))] { mod aes_hash; diff --git a/src/operations.rs b/src/operations.rs index a420587..008624a 100644 --- a/src/operations.rs +++ b/src/operations.rs @@ -111,7 +111,7 @@ pub(crate) fn aesenc(value: u128, xor: u128) -> u128 { } #[cfg(any( - all(target_arch = "aarch64", target_feature = "aes", not(miri)), + all(feature = "nightly-arm-aes", target_arch = "aarch64", target_feature = "aes", not(miri)), all(feature = "nightly-arm-aes", target_arch = "arm", target_feature = "aes", not(miri)), ))] #[allow(unused)] @@ -141,7 +141,7 @@ pub(crate) fn aesdec(value: u128, xor: u128) -> u128 { } #[cfg(any( - all(target_arch = "aarch64", target_feature = "aes", not(miri)), + all(feature = "nightly-arm-aes", target_arch = "aarch64", target_feature = "aes", not(miri)), all(feature = "nightly-arm-aes", target_arch = "arm", target_feature = "aes", not(miri)), ))] #[allow(unused)] diff --git a/src/random_state.rs b/src/random_state.rs index 3db8396..3ee629f 100644 --- a/src/random_state.rs +++ b/src/random_state.rs @@ -2,7 +2,7 @@ use core::hash::Hash; cfg_if::cfg_if! { if #[cfg(any( all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)), - all(target_arch = "aarch64", target_feature = "aes", not(miri)), + all(feature = "nightly-arm-aes", target_arch = "aarch64", target_feature = "aes", not(miri)), all(feature = "nightly-arm-aes", target_arch = "arm", target_feature = "aes", not(miri)), ))] { use crate::aes_hash::*; diff --git a/tests/bench.rs b/tests/bench.rs index e038ba4..59287ab 100644 --- a/tests/bench.rs +++ b/tests/bench.rs @@ -14,7 +14,7 @@ const AHASH_IMPL: &str = if cfg!(any( target_feature = "aes", not(miri), ), - all(target_arch = "aarch64", target_feature = "aes", not(miri)), + all(feature = "nightly-arm-aes", target_arch = "aarch64", target_feature = "aes", not(miri)), all( feature = "nightly-arm-aes", target_arch = "arm", From f817fff977152f365a4ef84857ed458c94723324 Mon Sep 17 00:00:00 2001 From: Tom Kaitchuck Date: Mon, 19 Feb 2024 16:31:21 -0800 Subject: [PATCH 9/9] Suppress unused warning Signed-off-by: Tom Kaitchuck --- src/operations.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/operations.rs b/src/operations.rs index 008624a..1970cbf 100644 --- a/src/operations.rs +++ b/src/operations.rs @@ -1,4 +1,5 @@ use crate::convert::*; +#[allow(unused)] use zerocopy::transmute; ///This constant comes from Kunth's prng (Empirically it works better than those from splitmix32).