diff options
| author | Jack O'Connor <[email protected]> | 2021-05-18 12:28:29 -0400 |
|---|---|---|
| committer | Jack O'Connor <[email protected]> | 2021-05-18 12:28:29 -0400 |
| commit | 037de38bfec4e813ab6189a50cb7c4cbae47268a (patch) | |
| tree | b3278cf3a14c18017350f4173d019e9050ba1397 /src/rust_avx2.rs | |
| parent | aa52ce3a4b211292ab2b59d0cb9bd4272d466eec (diff) | |
upgrade to arrayvec 0.7.0
This version uses const generics, which bumps our minimum supported
compiler version to 1.51.
Diffstat (limited to 'src/rust_avx2.rs')
| -rw-r--r-- | src/rust_avx2.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rust_avx2.rs b/src/rust_avx2.rs index 6ab773a..6290e70 100644 --- a/src/rust_avx2.rs +++ b/src/rust_avx2.rs @@ -383,8 +383,8 @@ pub unsafe fn hash8( } #[target_feature(enable = "avx2")] -pub unsafe fn hash_many<A: arrayvec::Array<Item = u8>>( - mut inputs: &[&A], +pub unsafe fn hash_many<const N: usize>( + mut inputs: &[&[u8; N]], key: &CVWords, mut counter: u64, increment_counter: IncrementCounter, @@ -398,7 +398,7 @@ pub unsafe fn hash_many<A: arrayvec::Array<Item = u8>>( // Safe because the layout of arrays is guaranteed, and because the // `blocks` count is determined statically from the argument type. let input_ptrs: &[*const u8; DEGREE] = &*(inputs.as_ptr() as *const [*const u8; DEGREE]); - let blocks = A::CAPACITY / BLOCK_LEN; + let blocks = N / BLOCK_LEN; hash8( input_ptrs, blocks, |
