Skip to content

Commit

Permalink
Satisfy clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Aug 28, 2024
1 parent dd0c3e0 commit b1870bd
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions aws-lc-rs/src/aead/nonce_sequence/counter32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions aws-lc-rs/src/aead/nonce_sequence/counter64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions aws-lc-rs/src/constant_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
1 change: 1 addition & 0 deletions aws-lc-rs/src/unstable/kdf/kbkdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 2 additions & 0 deletions aws-lc-rs/src/unstable/kdf/sskdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down
7 changes: 3 additions & 4 deletions aws-lc-sys/builder/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ fn verify_bindgen() -> Result<(), String> {
let mut major_version: u32 = 0;
let mut minor_version: u32 = 0;
let mut patch_version: u32 = 0;
let bindgen_version = result.stdout.split(' ').skip(1).next();
let bindgen_version = result.stdout.split(' ').nth(1);
if let Some(version) = bindgen_version {
let version_parts: Vec<&str> = version.trim().split('.').collect();
if version_parts.len() == 3 {
Expand All @@ -589,13 +589,12 @@ 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: {}.{}.{} \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\
See our User Guide for more information about bindgen:\
https://aws.github.io/aws-lc-rs/index.html",
major_version, minor_version, patch_version
https://aws.github.io/aws-lc-rs/index.html"
);
}
Ok(())
Expand Down

0 comments on commit b1870bd

Please sign in to comment.