Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippy: fix 'should_panic' lints #230

Merged
merged 2 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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