Skip to content

Commit

Permalink
Clippy: fix 'should_panic' lints
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Sep 5, 2023
1 parent a95cbcd commit 4f0826d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions aws-lc-rs/src/digest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,13 @@ mod tests {
super::max_input_test(&digest::$algorithm_name);
}
#[test]
#[should_panic]
#[should_panic(expected = "digest update failed")]
fn too_long_input_test_block() {
super::too_long_input_test_block(&digest::$algorithm_name);
}

#[test]
#[should_panic]
#[should_panic(expected = "digest update failed")]
fn too_long_input_test_byte() {
super::too_long_input_test_byte(&digest::$algorithm_name);
}
Expand Down
6 changes: 4 additions & 2 deletions aws-lc-rs/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,9 @@ mod tests {
}

#[test]
#[should_panic]
#[should_panic(
expected = "source slice length (42) does not match destination slice length (0)"
)]
fn fixed_slice_random_length_mismatch() {
let fbr = FixedSliceRandom { bytes: &[42u8; 42] };
let _: Result<(), error::Unspecified> = fbr.fill_impl(&mut []);
Expand All @@ -579,7 +581,7 @@ mod tests {
}

#[test]
#[should_panic]
#[should_panic(expected = "index out of bounds: the len is 0 but the index is 0")]
fn fixed_slice_sequence_random_no_remaining() {
let fbr = FixedSliceSequenceRandom {
bytes: &[],
Expand Down

0 comments on commit 4f0826d

Please sign in to comment.