Skip to content

Commit 302f032

Browse files
rusty1968FerralCoder
authored andcommitted
fix: allow unwrap() in RustCrypto cipher test code
Add #[allow(clippy::unwrap_used)] attribute to the RustCrypto cipher test module to permit unwrap() calls in test code while maintaining strict safety in production code. This matches the pattern established in the HAL cipher tests 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 Resolves clippy warnings about unwrap usage in the comprehensive AES-CTR test suite while preserving test readability and maintaining security guidelines for production code.
1 parent f15cd63 commit 302f032

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

platform/impls/rustcrypto/src/cipher.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ impl CipherStatus for AesCtrContext {
367367
}
368368

369369
#[cfg(test)]
370+
#[allow(clippy::unwrap_used)] // Allow unwrap in tests for cleaner test code
370371
mod tests {
371372
use super::*;
372373
use openprot_hal_blocking::cipher::BlockAligned;

0 commit comments

Comments
 (0)