diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index 7ad274b..dc2b0f7 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -17,7 +17,7 @@ jobs: - uses: RustCrypto/actions/cargo-cache@master - uses: dtolnay/rust-toolchain@master with: - toolchain: stable + toolchain: 1.71.0 components: clippy - run: cargo clippy --all -- -D warnings diff --git a/ascon/src/lib.rs b/ascon/src/lib.rs index 8719203..faed020 100644 --- a/ascon/src/lib.rs +++ b/ascon/src/lib.rs @@ -183,10 +183,7 @@ impl State { /// Convert state to bytes. pub fn as_bytes(&self) -> [u8; 40] { let mut bytes = [0u8; size_of::() * 5]; - for (dst, src) in bytes - .chunks_exact_mut(size_of::()) - .zip(self.x.into_iter()) - { + for (dst, src) in bytes.chunks_exact_mut(size_of::()).zip(self.x) { dst.copy_from_slice(&u64::to_be_bytes(src)); } bytes