Skip to content

Commit 7bf676c

Browse files
rusty1968FerralCoder
authored andcommitted
fix: allow unwrap() in cipher test code for cleaner assertions
Add #[allow(clippy::unwrap_used)] attribute to the cipher test module to permit unwrap() calls in test code while maintaining strict safety in production code. This follows Rust best practices where: - Production code remains panic-free (no unwrap/expect/panic) - Test code can use unwrap() for fail-fast behavior and cleaner assertions - Tests are meant to panic immediately when assumptions are violated All clippy warnings about unwrap usage are now resolved while preserving test readability and maintaining security guidelines for production code.
1 parent 38d81d1 commit 7bf676c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hal/blocking/src/cipher.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,7 @@ pub trait AeadCipherOp: SymmetricCipher + ErrorType {
645645
}
646646

647647
#[cfg(test)]
648+
#[allow(clippy::unwrap_used)] // Allow unwrap in tests for cleaner test code
648649
mod tests {
649650
use super::*;
650651

0 commit comments

Comments
 (0)