Skip to content

Commit

Permalink
Per Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Apr 25, 2024
1 parent e5c3e8a commit d248443
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
12 changes: 4 additions & 8 deletions aws-lc-rs/src/cipher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ impl Debug for EncryptingKey {
f.debug_struct("EncryptingKey")
.field("algorithm", self.algorithm)
.field("mode", &self.mode)
.finish()
.finish_non_exhaustive()
}
}

Expand Down Expand Up @@ -532,7 +532,7 @@ impl Debug for DecryptingKey {
f.debug_struct("DecryptingKey")
.field("algorithm", &self.algorithm)
.field("mode", &self.mode)
.finish()
.finish_non_exhaustive()
}
}

Expand All @@ -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),
},
}
}
Expand Down
4 changes: 2 additions & 2 deletions aws-lc-rs/src/cipher/padded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl Debug for PaddedBlockEncryptingKey {
.field("algorithm", &self.algorithm)
.field("mode", &self.mode)
.field("padding", &self.padding)
.finish()
.finish_non_exhaustive()
}
}

Expand Down Expand Up @@ -252,7 +252,7 @@ impl Debug for PaddedBlockDecryptingKey {
.field("algorithm", &self.algorithm)
.field("mode", &self.mode)
.field("padding", &self.padding)
.finish()
.finish_non_exhaustive()
}
}

Expand Down

0 comments on commit d248443

Please sign in to comment.