diff --git a/aws-lc-fips-sys/builder/main.rs b/aws-lc-fips-sys/builder/main.rs index 450b6ab95ac..2cd939546df 100644 --- a/aws-lc-fips-sys/builder/main.rs +++ b/aws-lc-fips-sys/builder/main.rs @@ -5,7 +5,6 @@ // Needed until MSRV >= 1.70 #![allow(clippy::unnecessary_map_or)] - #![allow(clippy::ref_option)] // Clippy can only be run on nightly toolchain #![cfg_attr(clippy, feature(custom_inner_attributes))] diff --git a/aws-lc-rs/src/test.rs b/aws-lc-rs/src/test.rs index 995a674cd3f..3ec47b1745c 100644 --- a/aws-lc-rs/src/test.rs +++ b/aws-lc-rs/src/test.rs @@ -217,9 +217,10 @@ impl TestCase { } } Some(b'"') => { - if s.next().is_some() { - panic!("characters after the closing quote of a quoted string."); - } + assert!( + s.next().is_none(), + "characters after the closing quote of a quoted string." + ); break; } Some(b) => *b, @@ -233,7 +234,7 @@ impl TestCase { match from_hex(&s) { Ok(s) => s, Err(err_str) => { - panic!("{} in {}", err_str, s); + panic!("{err_str} in {s}"); } } }; diff --git a/aws-lc-rs/tests/aead_test.rs b/aws-lc-rs/tests/aead_test.rs index f55cf3c45c9..3b521dd71b5 100644 --- a/aws-lc-rs/tests/aead_test.rs +++ b/aws-lc-rs/tests/aead_test.rs @@ -229,7 +229,7 @@ fn test_aead( assert_eq!(Err(error::Unspecified), o_result); } Some(error) => { - panic!("Unexpected error test case: {}", error); + panic!("Unexpected error test case: {error}"); } }; } diff --git a/aws-lc-rs/tests/ecdsa_tests.rs b/aws-lc-rs/tests/ecdsa_tests.rs index 7d783030b1e..9935ceca4fc 100644 --- a/aws-lc-rs/tests/ecdsa_tests.rs +++ b/aws-lc-rs/tests/ecdsa_tests.rs @@ -92,9 +92,9 @@ fn ecdsa_from_pkcs8_test() { match (EcdsaKeyPair::from_pkcs8(this_asn1, &input), error) { (Ok(_), None) => (), (Err(e), None) => { - panic!("Failed with error \"{}\", but expected to succeed", e); + panic!("Failed with error \"{e}\", but expected to succeed"); } - (Ok(_), Some(e)) => panic!("Succeeded, but expected error \"{}\"", e), + (Ok(_), Some(e)) => panic!("Succeeded, but expected error \"{e}\""), (Err(actual), Some(expected)) => assert_eq!(format!("{actual}"), expected), }; @@ -229,7 +229,7 @@ fn test_signature_ecdsa_verify_fixed(data_file: test::File) { ("secp256k1", "SHA256") => &signature::ECDSA_P256K1_SHA256_FIXED, ("secp256k1", "SHA3-256") => &signature::ECDSA_P256K1_SHA3_256_FIXED, _ => { - panic!("Unsupported curve+digest: {}+{}", curve_name, digest_name); + panic!("Unsupported curve+digest: {curve_name}+{digest_name}"); } }; diff --git a/aws-lc-sys/builder/main.rs b/aws-lc-sys/builder/main.rs index 959f0ac34b8..5e8279bd531 100644 --- a/aws-lc-sys/builder/main.rs +++ b/aws-lc-sys/builder/main.rs @@ -5,7 +5,6 @@ // Needed until MSRV >= 1.70 #![allow(clippy::unnecessary_map_or)] - #![allow(clippy::ref_option)] // Clippy can only be run on nightly toolchain #![cfg_attr(clippy, feature(custom_inner_attributes))]