diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index 17ba283..8c7cbc0 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.78.0 + toolchain: 1.82.0 components: clippy - run: cargo clippy --all -- -D warnings diff --git a/chacha20/src/backends/soft.rs b/chacha20/src/backends/soft.rs index 68013c4..ab036a7 100644 --- a/chacha20/src/backends/soft.rs +++ b/chacha20/src/backends/soft.rs @@ -14,17 +14,17 @@ use cipher::{ pub(crate) struct Backend<'a, R: Rounds, V: Variant>(pub(crate) &'a mut ChaChaCore); #[cfg(feature = "cipher")] -impl<'a, R: Rounds, V: Variant> BlockSizeUser for Backend<'a, R, V> { +impl BlockSizeUser for Backend<'_, R, V> { type BlockSize = U64; } #[cfg(feature = "cipher")] -impl<'a, R: Rounds, V: Variant> ParBlocksSizeUser for Backend<'a, R, V> { +impl ParBlocksSizeUser for Backend<'_, R, V> { type ParBlocksSize = U1; } #[cfg(feature = "cipher")] -impl<'a, R: Rounds, V: Variant> StreamCipherBackend for Backend<'a, R, V> { +impl StreamCipherBackend for Backend<'_, R, V> { #[inline(always)] fn gen_ks_block(&mut self, block: &mut Block) { let res = run_rounds::(&self.0.state); @@ -37,7 +37,7 @@ impl<'a, R: Rounds, V: Variant> StreamCipherBackend for Backend<'a, R, V> { } #[cfg(feature = "rng")] -impl<'a, R: Rounds, V: Variant> Backend<'a, R, V> { +impl Backend<'_, R, V> { #[inline(always)] pub(crate) fn gen_ks_blocks(&mut self, buffer: &mut [u32; 64]) { for i in 0..4 { diff --git a/hc-256/src/lib.rs b/hc-256/src/lib.rs index 38ad0fd..40a8ac2 100644 --- a/hc-256/src/lib.rs +++ b/hc-256/src/lib.rs @@ -248,15 +248,15 @@ impl ZeroizeOnDrop for Hc256Core {} struct Backend<'a>(&'a mut Hc256Core); -impl<'a> BlockSizeUser for Backend<'a> { +impl BlockSizeUser for Backend<'_> { type BlockSize = ::BlockSize; } -impl<'a> ParBlocksSizeUser for Backend<'a> { +impl ParBlocksSizeUser for Backend<'_> { type ParBlocksSize = U1; } -impl<'a> StreamCipherBackend for Backend<'a> { +impl StreamCipherBackend for Backend<'_> { #[inline(always)] fn gen_ks_block(&mut self, block: &mut Block) { block.copy_from_slice(&self.0.gen_word().to_le_bytes()); diff --git a/rabbit/src/lib.rs b/rabbit/src/lib.rs index 4c7f00c..c2b7b09 100644 --- a/rabbit/src/lib.rs +++ b/rabbit/src/lib.rs @@ -341,15 +341,15 @@ impl StreamCipherCore for RabbitCore { struct Backend<'a>(&'a mut State); -impl<'a> BlockSizeUser for Backend<'a> { +impl BlockSizeUser for Backend<'_> { type BlockSize = BlockSize; } -impl<'a> ParBlocksSizeUser for Backend<'a> { +impl ParBlocksSizeUser for Backend<'_> { type ParBlocksSize = U1; } -impl<'a> StreamCipherBackend for Backend<'a> { +impl StreamCipherBackend for Backend<'_> { #[inline(always)] fn gen_ks_block(&mut self, block: &mut Block) { block.copy_from_slice(&self.0.next_block()); diff --git a/rc4/src/lib.rs b/rc4/src/lib.rs index 7ee3a39..2aea454 100644 --- a/rc4/src/lib.rs +++ b/rc4/src/lib.rs @@ -105,15 +105,15 @@ impl ZeroizeOnDrop for Rc4Core where KeySize: ArraySize {} struct Backend<'a>(&'a mut Rc4State); -impl<'a> BlockSizeUser for Backend<'a> { +impl BlockSizeUser for Backend<'_> { type BlockSize = BlockSize; } -impl<'a> ParBlocksSizeUser for Backend<'a> { +impl ParBlocksSizeUser for Backend<'_> { type ParBlocksSize = consts::U1; } -impl<'a> StreamCipherBackend for Backend<'a> { +impl StreamCipherBackend for Backend<'_> { #[inline(always)] fn gen_ks_block(&mut self, block: &mut Block) { block[0] = self.0.prga(); diff --git a/salsa20/src/backends/soft.rs b/salsa20/src/backends/soft.rs index be8f908..b594142 100644 --- a/salsa20/src/backends/soft.rs +++ b/salsa20/src/backends/soft.rs @@ -9,15 +9,15 @@ use cipher::{ pub(crate) struct Backend<'a, R: Unsigned>(pub(crate) &'a mut SalsaCore); -impl<'a, R: Unsigned> BlockSizeUser for Backend<'a, R> { +impl BlockSizeUser for Backend<'_, R> { type BlockSize = U64; } -impl<'a, R: Unsigned> ParBlocksSizeUser for Backend<'a, R> { +impl ParBlocksSizeUser for Backend<'_, R> { type ParBlocksSize = U1; } -impl<'a, R: Unsigned> StreamCipherBackend for Backend<'a, R> { +impl StreamCipherBackend for Backend<'_, R> { #[inline(always)] fn gen_ks_block(&mut self, block: &mut Block) { let res = run_rounds::(&self.0.state);