We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a4763ad commit 7a96abfCopy full SHA for 7a96abf
hal/blocking/src/mac.rs
@@ -830,7 +830,7 @@ mod tests {
830
// Test wrong size
831
let wrong_size = &[0u8; 16][..];
832
let result = SecureKey::<32>::from_slice(wrong_size);
833
- assert_eq!(result.unwrap_err(), ErrorKind::InvalidInputLength);
+ assert!(matches!(result, Err(ErrorKind::InvalidInputLength)));
834
}
835
836
#[test]
@@ -879,7 +879,7 @@ mod tests {
879
880
// Slice
881
let slice_key: &[u8] = &[0u8; 32];
882
- let _slice_ref: &[u8] = slice_key.as_ref();
+ let _slice_ref: &[u8] = slice_key;
883
884
// All should be compatible with the new API
885
assert_eq!(_array_ref.len(), 32);
0 commit comments