Skip to content

Commit

Permalink
Satisfy clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Sep 3, 2024
1 parent bf91762 commit 4d0f99e
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 7 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
4 changes: 2 additions & 2 deletions aws-lc-sys/builder/cc_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ mod x86_64_unknown_linux_gnu;
mod x86_64_unknown_linux_musl;

use crate::{
cargo_env, emit_warning, env_var_to_bool, execute_command, get_cflags, out_dir, requested_c_std, target,
target_arch, target_os, target_vendor, CStdRequested, OutputLibType,
cargo_env, emit_warning, env_var_to_bool, execute_command, get_cflags, out_dir,
requested_c_std, target, target_arch, target_os, target_vendor, CStdRequested, OutputLibType,
};
use std::path::PathBuf;

Expand Down
6 changes: 3 additions & 3 deletions aws-lc-sys/builder/cmake_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

use crate::OutputLib::{Crypto, RustWrapper, Ssl};
use crate::{
allow_prebuilt_nasm, cargo_env, emit_warning, execute_command, get_cflags, is_crt_static, is_no_asm,
option_env, requested_c_std, target, target_arch, target_env, target_family, target_os,
target_underscored, target_vendor, test_nasm_command, CStdRequested, OutputLibType,
allow_prebuilt_nasm, cargo_env, emit_warning, execute_command, get_cflags, is_crt_static,
is_no_asm, option_env, requested_c_std, target, target_arch, target_env, target_family,
target_os, target_underscored, target_vendor, test_nasm_command, CStdRequested, OutputLibType,
};
use std::env;
use std::ffi::OsString;
Expand Down
2 changes: 0 additions & 2 deletions aws-lc-sys/builder/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,6 @@ fn generate_src_bindings(manifest_dir: &Path, prefix: &Option<String>, src_bindi
)
.write_to_file(src_bindings_path.join(format!("{}.rs", target_platform_prefix("crypto"))))
.expect("write bindings");


}

fn emit_rustc_cfg(cfg: &str) {
Expand Down

0 comments on commit 4d0f99e

Please sign in to comment.