Skip to content

Commit 0a576c9

Browse files
committed
Clippy fixes
1 parent 0749556 commit 0a576c9

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

aws-lc-fips-sys/builder/main.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
// Needed until MSRV >= 1.70
77
#![allow(clippy::unnecessary_map_or)]
8-
98
#![allow(clippy::ref_option)]
109
// Clippy can only be run on nightly toolchain
1110
#![cfg_attr(clippy, feature(custom_inner_attributes))]

aws-lc-rs/src/test.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,10 @@ impl TestCase {
217217
}
218218
}
219219
Some(b'"') => {
220-
if s.next().is_some() {
221-
panic!("characters after the closing quote of a quoted string.");
222-
}
220+
assert!(
221+
s.next().is_none(),
222+
"characters after the closing quote of a quoted string."
223+
);
223224
break;
224225
}
225226
Some(b) => *b,
@@ -233,7 +234,7 @@ impl TestCase {
233234
match from_hex(&s) {
234235
Ok(s) => s,
235236
Err(err_str) => {
236-
panic!("{} in {}", err_str, s);
237+
panic!("{err_str} in {s}");
237238
}
238239
}
239240
};

aws-lc-rs/tests/aead_test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ fn test_aead<Seal, Open>(
229229
assert_eq!(Err(error::Unspecified), o_result);
230230
}
231231
Some(error) => {
232-
panic!("Unexpected error test case: {}", error);
232+
panic!("Unexpected error test case: {error}");
233233
}
234234
};
235235
}

aws-lc-rs/tests/ecdsa_tests.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ fn ecdsa_from_pkcs8_test() {
9292
match (EcdsaKeyPair::from_pkcs8(this_asn1, &input), error) {
9393
(Ok(_), None) => (),
9494
(Err(e), None) => {
95-
panic!("Failed with error \"{}\", but expected to succeed", e);
95+
panic!("Failed with error \"{e}\", but expected to succeed");
9696
}
97-
(Ok(_), Some(e)) => panic!("Succeeded, but expected error \"{}\"", e),
97+
(Ok(_), Some(e)) => panic!("Succeeded, but expected error \"{e}\""),
9898
(Err(actual), Some(expected)) => assert_eq!(format!("{actual}"), expected),
9999
};
100100

@@ -229,7 +229,7 @@ fn test_signature_ecdsa_verify_fixed(data_file: test::File) {
229229
("secp256k1", "SHA256") => &signature::ECDSA_P256K1_SHA256_FIXED,
230230
("secp256k1", "SHA3-256") => &signature::ECDSA_P256K1_SHA3_256_FIXED,
231231
_ => {
232-
panic!("Unsupported curve+digest: {}+{}", curve_name, digest_name);
232+
panic!("Unsupported curve+digest: {curve_name}+{digest_name}");
233233
}
234234
};
235235

aws-lc-sys/builder/main.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
// Needed until MSRV >= 1.70
77
#![allow(clippy::unnecessary_map_or)]
8-
98
#![allow(clippy::ref_option)]
109
// Clippy can only be run on nightly toolchain
1110
#![cfg_attr(clippy, feature(custom_inner_attributes))]

0 commit comments

Comments
 (0)