From 452fcc8c0aefec8d169a57b179459ad5e652d477 Mon Sep 17 00:00:00 2001 From: Justin Smith Date: Wed, 28 Aug 2024 08:34:19 -0400 Subject: [PATCH] Satisfy clippy --- aws-lc-rs/src/aead/nonce_sequence/counter32.rs | 1 + aws-lc-rs/src/aead/nonce_sequence/counter64.rs | 1 + aws-lc-rs/src/constant_time.rs | 1 + aws-lc-rs/src/unstable/kdf/kbkdf.rs | 1 + aws-lc-rs/src/unstable/kdf/sskdf.rs | 2 ++ aws-lc-sys/builder/main.rs | 3 +-- 6 files changed, 7 insertions(+), 2 deletions(-) diff --git a/aws-lc-rs/src/aead/nonce_sequence/counter32.rs b/aws-lc-rs/src/aead/nonce_sequence/counter32.rs index ca66ff9e5e6..e7d33e22ee1 100644 --- a/aws-lc-rs/src/aead/nonce_sequence/counter32.rs +++ b/aws-lc-rs/src/aead/nonce_sequence/counter32.rs @@ -6,6 +6,7 @@ use crate::error::Unspecified; use crate::iv::FixedLength; /// `Counter32` is an implementation of the `NonceSequence` trait. +/// /// The internal state of a `Counter32` is a 32-bit unsigned counter that /// increments on each call to `advance` and an optional 8-byte identifier. Counter and identifier /// values are used to construct each nonce. diff --git a/aws-lc-rs/src/aead/nonce_sequence/counter64.rs b/aws-lc-rs/src/aead/nonce_sequence/counter64.rs index 0ebcb74dfe3..8c6af9cbce9 100644 --- a/aws-lc-rs/src/aead/nonce_sequence/counter64.rs +++ b/aws-lc-rs/src/aead/nonce_sequence/counter64.rs @@ -6,6 +6,7 @@ use crate::error::Unspecified; use crate::iv::FixedLength; /// `Counter64` is an implementation of the `NonceSequence` trait. +/// /// The internal state of a `Counter64` is a 64-bit unsigned counter that /// increments on each call to `advance` and an optional 4-byte identifier. Counter and identifier /// values are used to construct each nonce. diff --git a/aws-lc-rs/src/constant_time.rs b/aws-lc-rs/src/constant_time.rs index 7d0ab9dc277..8850d8dfaa6 100644 --- a/aws-lc-rs/src/constant_time.rs +++ b/aws-lc-rs/src/constant_time.rs @@ -9,6 +9,7 @@ use crate::error; use aws_lc::CRYPTO_memcmp; /// Returns `Ok(())` if `a == b` and `Err(error::Unspecified)` otherwise. +/// /// The comparison of `a` and `b` is done in constant time with respect to the /// contents of each, but NOT in constant time with respect to the lengths of /// `a` and `b`. diff --git a/aws-lc-rs/src/unstable/kdf/kbkdf.rs b/aws-lc-rs/src/unstable/kdf/kbkdf.rs index 5b901195def..ef75c093ad4 100644 --- a/aws-lc-rs/src/unstable/kdf/kbkdf.rs +++ b/aws-lc-rs/src/unstable/kdf/kbkdf.rs @@ -57,6 +57,7 @@ const KBKDF_CTR_HMAC_SHA512: KbkdfCtrHmacAlgorithm = KbkdfCtrHmacAlgorithm { }; /// Retrieve an unstable [`KbkdfCtrHmacAlgorithm`] using the [`KbkdfCtrHmacAlgorithmId`] specified by `id`. +/// /// May return [`None`] if the algorithm is not usable with the configured crate feature set (i.e. `fips`). #[must_use] pub const fn get_kbkdf_ctr_hmac_algorithm( diff --git a/aws-lc-rs/src/unstable/kdf/sskdf.rs b/aws-lc-rs/src/unstable/kdf/sskdf.rs index 9d26a891fcd..35df79eadf9 100644 --- a/aws-lc-rs/src/unstable/kdf/sskdf.rs +++ b/aws-lc-rs/src/unstable/kdf/sskdf.rs @@ -96,6 +96,7 @@ const SSKDF_DIGEST_SHA512: SskdfDigestAlgorithm = SskdfDigestAlgorithm { }; /// Retrieve an unstable [`SskdfHmacAlgorithm`] using the [`SskdfHmacAlgorithmId`] specified by `id`. +/// /// May return [`None`] if the algorithm is not usable with the configured crate feature set (i.e. `fips`). #[must_use] pub const fn get_sskdf_hmac_algorithm( @@ -118,6 +119,7 @@ pub const fn get_sskdf_hmac_algorithm( } /// Retrieve an unstable [`SskdfDigestAlgorithm`] using the [`SskdfDigestAlgorithmId`] specified by `id`. +/// /// May return [`None`] if the algorithm is not usable with the configured crate feature set (i.e. `fips`). #[must_use] pub const fn get_sskdf_digest_algorithm( diff --git a/aws-lc-sys/builder/main.rs b/aws-lc-sys/builder/main.rs index 0f7d210fc6f..370771b4288 100644 --- a/aws-lc-sys/builder/main.rs +++ b/aws-lc-sys/builder/main.rs @@ -616,8 +616,7 @@ fn verify_bindgen() -> Result<(), String> { // We currently expect to support all bindgen versions >= 0.69.3 if major_version == 0 && (minor_version < 69 || (minor_version == 69 && patch_version < 3)) { eprintln!( - "bindgen-cli was used. Detected version was: \ - {major_version}.{minor_version}.{patch_version} \n\ + "bindgen-cli was used. Detected version was: {major_version}.{minor_version}.{patch_version} \n\ If this is not the latest version, consider upgrading : \ `cargo install --force --locked bindgen-cli`\ \n\