From d248443015d3d4fbf4e81bbaf5a4a8c1f03d4559 Mon Sep 17 00:00:00 2001 From: Justin Smith Date: Thu, 25 Apr 2024 11:20:40 -0400 Subject: [PATCH] Per Clippy --- aws-lc-rs/src/cipher.rs | 12 ++++-------- aws-lc-rs/src/cipher/padded.rs | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/aws-lc-rs/src/cipher.rs b/aws-lc-rs/src/cipher.rs index 249e53679d5..3a249895cd3 100644 --- a/aws-lc-rs/src/cipher.rs +++ b/aws-lc-rs/src/cipher.rs @@ -464,7 +464,7 @@ impl Debug for EncryptingKey { f.debug_struct("EncryptingKey") .field("algorithm", self.algorithm) .field("mode", &self.mode) - .finish() + .finish_non_exhaustive() } } @@ -532,7 +532,7 @@ impl Debug for DecryptingKey { f.debug_struct("DecryptingKey") .field("algorithm", &self.algorithm) .field("mode", &self.mode) - .finish() + .finish_non_exhaustive() } } @@ -556,14 +556,10 @@ fn encrypt( match mode { OperatingMode::CBC => match algorithm.id() { - AlgorithmId::Aes128 | AlgorithmId::Aes256 => { - encrypt_aes_cbc_mode(&key, context, in_out) - } + AlgorithmId::Aes128 | AlgorithmId::Aes256 => encrypt_aes_cbc_mode(key, context, in_out), }, OperatingMode::CTR => match algorithm.id() { - AlgorithmId::Aes128 | AlgorithmId::Aes256 => { - encrypt_aes_ctr_mode(&key, context, in_out) - } + AlgorithmId::Aes128 | AlgorithmId::Aes256 => encrypt_aes_ctr_mode(key, context, in_out), }, } } diff --git a/aws-lc-rs/src/cipher/padded.rs b/aws-lc-rs/src/cipher/padded.rs index eae5ea0db23..aee8a4d64ac 100644 --- a/aws-lc-rs/src/cipher/padded.rs +++ b/aws-lc-rs/src/cipher/padded.rs @@ -166,7 +166,7 @@ impl Debug for PaddedBlockEncryptingKey { .field("algorithm", &self.algorithm) .field("mode", &self.mode) .field("padding", &self.padding) - .finish() + .finish_non_exhaustive() } } @@ -252,7 +252,7 @@ impl Debug for PaddedBlockDecryptingKey { .field("algorithm", &self.algorithm) .field("mode", &self.mode) .field("padding", &self.padding) - .finish() + .finish_non_exhaustive() } }