Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix latest clippy lints #606

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aws-lc-fips-sys/builder/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ fn setup_include_paths(out_dir: &Path, manifest_dir: &Path) -> PathBuf {
// iterate over all the include paths and copy them into the final output
for path in include_paths {
for child in std::fs::read_dir(path).into_iter().flatten().flatten() {
if child.file_type().map_or(false, |t| t.is_file()) {
if child.file_type().is_ok_and(|t| t.is_file()) {
let _ = std::fs::copy(
child.path(),
include_dir.join(child.path().file_name().unwrap()),
Expand Down
8 changes: 4 additions & 4 deletions aws-lc-rs/src/cipher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ impl EncryptingKey {
}

/// Constructs an `EncryptingKey` operating in electronic code book mode (ECB) using the provided key.
///
///
/// # ☠️ ️️️DANGER ☠️
/// Offered for computability purposes only. This is an extremely dangerous mode, and
/// very likely not what you want to use.
Expand Down Expand Up @@ -571,7 +571,7 @@ impl EncryptingKey {
/// Encrypts the data provided in `in_out` in-place.
/// Returns a [`DecryptionContext`] with the randomly generated IV that was used to encrypt
/// the data provided.
///
///
/// If `EncryptingKey` is operating in `OperatingMode::ECB`, then `in_out.len()` must be a multiple
/// of the block length.
///
Expand All @@ -587,7 +587,7 @@ impl EncryptingKey {
/// This is considered "less safe" because the caller could potentially construct
/// a `EncryptionContext` from a previously used IV (initialization vector).
/// Returns a [`DecryptionContext`] produced from the provided `EncryptionContext`.
///
///
/// If `EncryptingKey` is operating in `OperatingMode::ECB`, then `in_out.len()` must be a multiple
/// of the block length.
///
Expand Down Expand Up @@ -694,7 +694,7 @@ impl DecryptingKey {

/// Decrypts the data provided in `in_out` in-place.
/// Returns a references to the decrypted data.
///
///
/// If `DecryptingKey` is operating in `OperatingMode::ECB`, then `in_out.len()` must be a multiple
/// of the block length.
///
Expand Down
4 changes: 2 additions & 2 deletions aws-lc-rs/src/cipher/padded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl PaddedBlockEncryptingKey {

/// Constructs a new `PaddedBlockEncryptingKey` cipher with electronic code book (ECB) mode.
/// Plaintext data is padded following the PKCS#7 scheme.
///
///
/// # ☠️ ️️️DANGER ☠️
/// Offered for computability purposes only. This is an extremely dangerous mode, and
/// very likely not what you want to use.
Expand Down Expand Up @@ -210,7 +210,7 @@ impl PaddedBlockDecryptingKey {

/// Constructs a new `PaddedBlockDecryptingKey` cipher with electronic code book (ECB) mode.
/// Decrypted data is unpadded following the PKCS#7 scheme.
///
///
/// # ☠️ ️️️DANGER ☠️
/// Offered for computability purposes only. This is an extremely dangerous mode, and
/// very likely not what you want to use.
Expand Down
2 changes: 1 addition & 1 deletion aws-lc-sys/builder/cc_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ impl CcBuilder {
let source_path = self.manifest_dir.join("aws-lc").join(source);
let is_asm = std::path::Path::new(source)
.extension()
.map_or(false, |ext| ext.eq("S"));
.is_some_and(|ext| ext.eq("S"));
if is_asm && target_vendor() == "apple" && target_arch() == "aarch64" {
let mut cc_preprocessor = self.create_builder();
cc_preprocessor.file(source_path);
Expand Down
2 changes: 1 addition & 1 deletion aws-lc-sys/builder/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ fn setup_include_paths(out_dir: &Path, manifest_dir: &Path) -> PathBuf {
// iterate over all the include paths and copy them into the final output
for path in include_paths {
for child in std::fs::read_dir(path).into_iter().flatten().flatten() {
if child.file_type().map_or(false, |t| t.is_file()) {
if child.file_type().is_ok_and(|t| t.is_file()) {
let _ = std::fs::copy(
child.path(),
include_dir.join(child.path().file_name().unwrap()),
Expand Down
Loading