From 690624016ec82683bcfbf4ced931e68afe29fc73 Mon Sep 17 00:00:00 2001 From: Artyom Pavlov Date: Mon, 7 Aug 2023 17:36:22 +0300 Subject: [PATCH] Pin Clippy version and fix lints (#59) --- .github/workflows/workspace.yml | 2 +- ascon/src/lib.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) 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