Skip to content

Commit f6e3f65

Browse files
committed
Address clippy
1 parent ae795a7 commit f6e3f65

File tree

11 files changed

+58
-59
lines changed

11 files changed

+58
-59
lines changed

aws-lc-sys/builder/cc_builder.rs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,15 @@ fn identify_sources() -> Vec<&'static str> {
5858
} else if target_arch() == "aarch64" || target_arch() == "arm64" {
5959
source_files.append(&mut Vec::from(apple_aarch64::CRYPTO_LIBRARY));
6060
}
61-
} else {
62-
if target_arch() == "x86_64" {
63-
source_files.append(&mut Vec::from(linux_x86_64::CRYPTO_LIBRARY));
64-
} else if target_arch() == "aarch64" || target_arch() == "arm64" {
65-
source_files.append(&mut Vec::from(linux_aarch64::CRYPTO_LIBRARY));
66-
} else if target_arch().ends_with("86") && target_arch().starts_with("i") {
67-
source_files.append(&mut Vec::from(linux_i686::CRYPTO_LIBRARY));
68-
} else if target_arch() == "powerpc64le" {
69-
source_files.append(&mut Vec::from(linux_ppc64le::CRYPTO_LIBRARY));
70-
}
71-
};
61+
} else if target_arch() == "x86_64" {
62+
source_files.append(&mut Vec::from(linux_x86_64::CRYPTO_LIBRARY));
63+
} else if target_arch() == "aarch64" || target_arch() == "arm64" {
64+
source_files.append(&mut Vec::from(linux_aarch64::CRYPTO_LIBRARY));
65+
} else if target_arch().ends_with("86") && target_arch().starts_with('i') {
66+
source_files.append(&mut Vec::from(linux_i686::CRYPTO_LIBRARY));
67+
} else if target_arch() == "powerpc64le" {
68+
source_files.append(&mut Vec::from(linux_ppc64le::CRYPTO_LIBRARY));
69+
}
7270
source_files
7371
}
7472

@@ -144,7 +142,7 @@ impl BuildOption {
144142
BuildOption::FLAG(val) => nasm_builder.flag(val),
145143
BuildOption::DEFINE(key, val) => nasm_builder.define(key, Some(val.as_str())),
146144
BuildOption::INCLUDE(path) => nasm_builder.include(path.as_path()),
147-
_ => nasm_builder, // STD ignored for NASM
145+
BuildOption::STD(_) => nasm_builder, // STD ignored for NASM
148146
}
149147
}
150148
}
@@ -348,6 +346,7 @@ impl CcBuilder {
348346
source_feature_map
349347
}
350348

349+
#[allow(clippy::unused_self)]
351350
fn add_defines(&self, build_options: &mut Vec<BuildOption>, is_like_msvc: bool) {
352351
if is_like_msvc {
353352
build_options.push(BuildOption::define("_HAS_EXCEPTIONS", "0"));

aws-lc-sys/builder/cc_builder/apple_aarch64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
33
// Tue Sep 30 15:54:00 UTC 2025
44

5-
pub(super) const CRYPTO_LIBRARY: &'static [&'static str] = &[
5+
pub(super) const CRYPTO_LIBRARY: &[&str] = &[
66
"crypto/fipsmodule/ml_kem/mlkem/native/aarch64/src/intt.S",
77
"crypto/fipsmodule/ml_kem/mlkem/native/aarch64/src/ntt.S",
88
"crypto/fipsmodule/ml_kem/mlkem/native/aarch64/src/poly_mulcache_compute_asm.S",

aws-lc-sys/builder/cc_builder/apple_x86_64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
33
// Tue Sep 30 15:55:28 UTC 2025
44

5-
pub(super) const CRYPTO_LIBRARY: &'static [&'static str] = &[
5+
pub(super) const CRYPTO_LIBRARY: &[&str] = &[
66
"crypto/fipsmodule/ml_kem/mlkem/native/x86_64/src/intt.S",
77
"crypto/fipsmodule/ml_kem/mlkem/native/x86_64/src/mulcache_compute.S",
88
"crypto/fipsmodule/ml_kem/mlkem/native/x86_64/src/ntt.S",

aws-lc-sys/builder/cc_builder/linux_aarch64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
33
// Tue Sep 30 15:58:17 UTC 2025
44

5-
pub(super) const CRYPTO_LIBRARY: &'static [&'static str] = &[
5+
pub(super) const CRYPTO_LIBRARY: &[&str] = &[
66
"crypto/fipsmodule/ml_kem/mlkem/native/aarch64/src/intt.S",
77
"crypto/fipsmodule/ml_kem/mlkem/native/aarch64/src/ntt.S",
88
"crypto/fipsmodule/ml_kem/mlkem/native/aarch64/src/poly_mulcache_compute_asm.S",

aws-lc-sys/builder/cc_builder/linux_i686.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
33
// Tue Sep 30 15:58:42 UTC 2025
44

5-
pub(super) const CRYPTO_LIBRARY: &'static [&'static str] = &[
5+
pub(super) const CRYPTO_LIBRARY: &[&str] = &[
66
"generated-src/linux-x86/crypto/chacha/chacha-x86.S",
77
"generated-src/linux-x86/crypto/fipsmodule/aesni-x86.S",
88
"generated-src/linux-x86/crypto/fipsmodule/bn-586.S",

aws-lc-sys/builder/cc_builder/linux_ppc64le.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub(super) const CRYPTO_LIBRARY: &'static [&'static str] = &[
1+
pub(super) const CRYPTO_LIBRARY: &[&str] = &[
22
"generated-src/linux-ppc64le/crypto/fipsmodule/aesp8-ppc.S",
33
"generated-src/linux-ppc64le/crypto/fipsmodule/ghashp8-ppc.S",
44
"generated-src/linux-ppc64le/crypto/test/trampoline-ppc.S",

aws-lc-sys/builder/cc_builder/linux_x86_64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
33
// Tue Sep 30 15:53:39 UTC 2025
44

5-
pub(super) const CRYPTO_LIBRARY: &'static [&'static str] = &[
5+
pub(super) const CRYPTO_LIBRARY: &[&str] = &[
66
"crypto/fipsmodule/ml_kem/mlkem/native/x86_64/src/intt.S",
77
"crypto/fipsmodule/ml_kem/mlkem/native/x86_64/src/mulcache_compute.S",
88
"crypto/fipsmodule/ml_kem/mlkem/native/x86_64/src/ntt.S",

aws-lc-sys/builder/cc_builder/universal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
33

4-
pub(super) const CRYPTO_LIBRARY: &'static [&'static str] = &[
4+
pub(super) const CRYPTO_LIBRARY: &[&str] = &[
55
"crypto/asn1/a_bitstr.c",
66
"crypto/asn1/a_bool.c",
77
"crypto/asn1/a_d2i_fp.c",

aws-lc-sys/builder/cc_builder/win_aarch64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
33
// Tue Sep 30 15:55:28 UTC 2025
44

5-
pub(super) const CRYPTO_LIBRARY: &'static [&'static str] = &[
5+
pub(super) const CRYPTO_LIBRARY: &[&str] = &[
66
"generated-src/win-aarch64/crypto/chacha/chacha-armv8.S",
77
"generated-src/win-aarch64/crypto/cipher_extra/chacha20_poly1305_armv8.S",
88
"generated-src/win-aarch64/crypto/fipsmodule/aesv8-armx.S",

aws-lc-sys/builder/cc_builder/win_x86_64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub(super) const CRYPTO_LIBRARY: &'static [&'static str] = &[
1+
pub(super) const CRYPTO_LIBRARY: &[&str] = &[
22
"generated-src/win-x86_64/crypto/chacha/chacha-x86_64.asm",
33
"generated-src/win-x86_64/crypto/cipher_extra/aes128gcmsiv-x86_64.asm",
44
"generated-src/win-x86_64/crypto/cipher_extra/aesni-sha1-x86_64.asm",

0 commit comments

Comments
 (0)