From 4da9b802de52a3326fdc74d559caddd57042fed2 Mon Sep 17 00:00:00 2001 From: Artyom Pavlov Date: Thu, 24 Oct 2024 04:59:46 +0300 Subject: [PATCH] kuznyechik: fix new Clippy lint (#458) --- .github/workflows/workspace.yml | 2 +- kuznyechik/src/big_soft/backends.rs | 12 ++++++------ kuznyechik/src/compact_soft/backends.rs | 12 ++++++------ kuznyechik/src/neon/backends.rs | 12 ++++++------ kuznyechik/src/sse2/backends.rs | 12 ++++++------ 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index eb7f4a04..6528fb0b 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: 1.81.0 + toolchain: 1.82.0 components: clippy - run: cargo clippy --all --exclude aes --all-features -- -D warnings diff --git a/kuznyechik/src/big_soft/backends.rs b/kuznyechik/src/big_soft/backends.rs index 578f0afb..a00e806c 100644 --- a/kuznyechik/src/big_soft/backends.rs +++ b/kuznyechik/src/big_soft/backends.rs @@ -89,15 +89,15 @@ pub(super) fn inv_enc_keys(enc_keys: &RoundKeys) -> RoundKeys { pub(crate) struct EncBackend<'a>(pub(crate) &'a RoundKeys); -impl<'a> BlockSizeUser for EncBackend<'a> { +impl BlockSizeUser for EncBackend<'_> { type BlockSize = consts::U16; } -impl<'a> ParBlocksSizeUser for EncBackend<'a> { +impl ParBlocksSizeUser for EncBackend<'_> { type ParBlocksSize = ParBlocksSize; } -impl<'a> BlockCipherEncBackend for EncBackend<'a> { +impl BlockCipherEncBackend for EncBackend<'_> { #[inline] fn encrypt_block(&self, mut block: InOut<'_, '_, Block>) { let k = self.0; @@ -136,15 +136,15 @@ impl<'a> BlockCipherEncBackend for EncBackend<'a> { pub(crate) struct DecBackend<'a>(pub(crate) &'a RoundKeys); -impl<'a> BlockSizeUser for DecBackend<'a> { +impl BlockSizeUser for DecBackend<'_> { type BlockSize = consts::U16; } -impl<'a> ParBlocksSizeUser for DecBackend<'a> { +impl ParBlocksSizeUser for DecBackend<'_> { type ParBlocksSize = consts::U1; } -impl<'a> BlockCipherDecBackend for DecBackend<'a> { +impl BlockCipherDecBackend for DecBackend<'_> { #[inline] fn decrypt_block(&self, mut block: InOut<'_, '_, Block>) { let k = self.0; diff --git a/kuznyechik/src/compact_soft/backends.rs b/kuznyechik/src/compact_soft/backends.rs index 06d6486c..eb5ba4c5 100644 --- a/kuznyechik/src/compact_soft/backends.rs +++ b/kuznyechik/src/compact_soft/backends.rs @@ -80,15 +80,15 @@ pub(super) fn expand(key: &Key) -> RoundKeys { pub(crate) struct EncBackend<'a>(pub(crate) &'a RoundKeys); -impl<'a> BlockSizeUser for EncBackend<'a> { +impl BlockSizeUser for EncBackend<'_> { type BlockSize = consts::U16; } -impl<'a> ParBlocksSizeUser for EncBackend<'a> { +impl ParBlocksSizeUser for EncBackend<'_> { type ParBlocksSize = consts::U1; } -impl<'a> BlockCipherEncBackend for EncBackend<'a> { +impl BlockCipherEncBackend for EncBackend<'_> { #[inline] fn encrypt_block(&self, mut block: InOut<'_, '_, Block>) { let mut b = *block.get_in(); @@ -102,15 +102,15 @@ impl<'a> BlockCipherEncBackend for EncBackend<'a> { pub(crate) struct DecBackend<'a>(pub(crate) &'a RoundKeys); -impl<'a> BlockSizeUser for DecBackend<'a> { +impl BlockSizeUser for DecBackend<'_> { type BlockSize = consts::U16; } -impl<'a> ParBlocksSizeUser for DecBackend<'a> { +impl ParBlocksSizeUser for DecBackend<'_> { type ParBlocksSize = consts::U1; } -impl<'a> BlockCipherDecBackend for DecBackend<'a> { +impl BlockCipherDecBackend for DecBackend<'_> { #[inline] fn decrypt_block(&self, mut block: InOut<'_, '_, Block>) { let mut b = *block.get_in(); diff --git a/kuznyechik/src/neon/backends.rs b/kuznyechik/src/neon/backends.rs index 79539cc7..7b2a49df 100644 --- a/kuznyechik/src/neon/backends.rs +++ b/kuznyechik/src/neon/backends.rs @@ -187,15 +187,15 @@ pub fn inv_enc_keys(enc_keys: &RoundKeys) -> RoundKeys { pub(crate) struct EncBackend<'a>(pub(crate) &'a RoundKeys); -impl<'a> BlockSizeUser for EncBackend<'a> { +impl BlockSizeUser for EncBackend<'_> { type BlockSize = consts::U16; } -impl<'a> ParBlocksSizeUser for EncBackend<'a> { +impl ParBlocksSizeUser for EncBackend<'_> { type ParBlocksSize = ParBlocksSize; } -impl<'a> BlockCipherEncBackend for EncBackend<'a> { +impl BlockCipherEncBackend for EncBackend<'_> { #[inline] fn encrypt_block(&self, block: InOut<'_, '_, Block>) { let k = self.0; @@ -246,15 +246,15 @@ impl<'a> BlockCipherEncBackend for EncBackend<'a> { pub(crate) struct DecBackend<'a>(pub(crate) &'a RoundKeys); -impl<'a> BlockSizeUser for DecBackend<'a> { +impl BlockSizeUser for DecBackend<'_> { type BlockSize = consts::U16; } -impl<'a> ParBlocksSizeUser for DecBackend<'a> { +impl ParBlocksSizeUser for DecBackend<'_> { type ParBlocksSize = ParBlocksSize; } -impl<'a> BlockCipherDecBackend for DecBackend<'a> { +impl BlockCipherDecBackend for DecBackend<'_> { #[inline] fn decrypt_block(&self, block: InOut<'_, '_, Block>) { let k = self.0; diff --git a/kuznyechik/src/sse2/backends.rs b/kuznyechik/src/sse2/backends.rs index bfa4a752..ffa9a97b 100644 --- a/kuznyechik/src/sse2/backends.rs +++ b/kuznyechik/src/sse2/backends.rs @@ -166,15 +166,15 @@ pub(super) fn inv_enc_keys(enc_keys: &RoundKeys) -> RoundKeys { pub(crate) struct EncBackend<'a>(pub(crate) &'a RoundKeys); -impl<'a> BlockSizeUser for EncBackend<'a> { +impl BlockSizeUser for EncBackend<'_> { type BlockSize = U16; } -impl<'a> ParBlocksSizeUser for EncBackend<'a> { +impl ParBlocksSizeUser for EncBackend<'_> { type ParBlocksSize = ParBlocksSize; } -impl<'a> BlockCipherEncBackend for EncBackend<'a> { +impl BlockCipherEncBackend for EncBackend<'_> { #[inline] fn encrypt_block(&self, block: InOut<'_, '_, Block>) { let k = self.0; @@ -225,15 +225,15 @@ impl<'a> BlockCipherEncBackend for EncBackend<'a> { pub(crate) struct DecBackend<'a>(pub(crate) &'a RoundKeys); -impl<'a> BlockSizeUser for DecBackend<'a> { +impl BlockSizeUser for DecBackend<'_> { type BlockSize = U16; } -impl<'a> ParBlocksSizeUser for DecBackend<'a> { +impl ParBlocksSizeUser for DecBackend<'_> { type ParBlocksSize = ParBlocksSize; } -impl<'a> BlockCipherDecBackend for DecBackend<'a> { +impl BlockCipherDecBackend for DecBackend<'_> { #[inline] fn decrypt_block(&self, block: InOut<'_, '_, Block>) { let k = self.0;