diff --git a/src/aead/poly1305.rs b/src/aead/poly1305.rs index b903a6af1..1d62749fe 100644 --- a/src/aead/poly1305.rs +++ b/src/aead/poly1305.rs @@ -101,6 +101,7 @@ impl Context { #[cfg(test)] pub fn check_state_layout() { + #[allow(clippy::if_same_then_else)] let required_state_size = if cfg!(target_arch = "x86") { // See comment above `_poly1305_init_sse2` in poly1305-x86.pl. Some(4 * (5 + 1 + 4 + 2 + 4 * 9)) diff --git a/tests/aead_tests.rs b/tests/aead_tests.rs index 0fc7ff18e..cf34ab858 100644 --- a/tests/aead_tests.rs +++ b/tests/aead_tests.rs @@ -212,6 +212,7 @@ fn test_aead( if cfg!(debug_assertions) { in_prefix_lengths = &MINIMAL_IN_PREFIX_LENS[..]; } else { + #[allow(clippy::needless_range_loop)] for b in 0..more_comprehensive_in_prefix_lengths.len() { more_comprehensive_in_prefix_lengths[b] = b; } @@ -300,6 +301,7 @@ fn open_with_less_safe_key<'a>( key.open_within(nonce, aad, in_out, ciphertext_and_tag) } +#[allow(clippy::range_plus_one)] fn test_aead_key_sizes(aead_alg: &'static aead::Algorithm) { let key_len = aead_alg.key_len(); let key_data = vec![0u8; key_len * 2]; @@ -327,6 +329,7 @@ fn test_aead_key_sizes(aead_alg: &'static aead::Algorithm) { } // Test that we reject non-standard nonce sizes. +#[allow(clippy::range_plus_one)] #[test] fn test_aead_nonce_sizes() -> Result<(), error::Unspecified> { let nonce_len = aead::NONCE_LEN; @@ -350,6 +353,7 @@ fn test_aead_nonce_sizes() -> Result<(), error::Unspecified> { target_arch = "x86_64", target_arch = "x86" ))] +#[allow(clippy::range_plus_one)] #[test] fn aead_chacha20_poly1305_openssh() { // TODO: test_aead_key_sizes(...); diff --git a/tests/agreement_tests.rs b/tests/agreement_tests.rs index 99d4a5e7e..43f62d291 100644 --- a/tests/agreement_tests.rs +++ b/tests/agreement_tests.rs @@ -77,6 +77,7 @@ fn agreement_traits<'a>() { ); } +#[allow(clippy::block_in_if_condition_stmt)] #[test] fn agreement_agree_ephemeral() { let rng = rand::SystemRandom::new(); diff --git a/tests/quic_tests.rs b/tests/quic_tests.rs index 472938f87..3e9689cd5 100644 --- a/tests/quic_tests.rs +++ b/tests/quic_tests.rs @@ -64,6 +64,7 @@ fn test_quic(alg: &'static quic::Algorithm, test_file: test::File) { }); } +#[allow(clippy::range_plus_one)] fn test_sample_len(alg: &'static quic::Algorithm) { let key_len = alg.key_len(); let key_data = vec![0u8; key_len];