Skip to content

Commit

Permalink
Clippy: fix 'should_panic' lints (#230)
Browse files Browse the repository at this point in the history
* Clippy: fix 'should_panic' lints

* also fix api-diff
  • Loading branch information
justsmth authored Sep 7, 2023
1 parent a95cbcd commit af1838c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- uses: actions-rs/[email protected]
id: toolchain
with:
toolchain: nightly-2023-05-24
toolchain: nightly-2023-08-25
profile: minimal
override: true
- name: Install cargo-public-api
Expand Down
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 af1838c

Please sign in to comment.