Skip to content

Commit

Permalink
kuznyechik: fix new Clippy lint (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov authored Oct 24, 2024
1 parent 01b7daf commit 4da9b80
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions kuznyechik/src/big_soft/backends.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions kuznyechik/src/compact_soft/backends.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
12 changes: 6 additions & 6 deletions kuznyechik/src/neon/backends.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions kuznyechik/src/sse2/backends.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4da9b80

Please sign in to comment.