From dd93d2ee7f6d93e3eeb1cadb948d1a7f362d2703 Mon Sep 17 00:00:00 2001 From: Ray Walker Date: Tue, 29 Sep 2026 20:59:47 +1000 Subject: [PATCH] refactor(encryption): return the AES-NI probe directly (LAB-6339) clippy 1.100 (beta) extends needless_bool to an `if c { return true; }` guard followed by `false`, and CI's beta job runs clippy with -D warnings, so every open PR shows a red beta check. The x86 fallback now returns is_x86_feature_detected!("aes") as its tail expression, the same shape as the aarch64 branch below it. Behaviour is unchanged. Fixing it on main rather than in each PR also covers the required stable checks once 1.100 reaches stable. --- src/encryption/core.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/encryption/core.rs b/src/encryption/core.rs index 6fa89c4..7c7cfcf 100644 --- a/src/encryption/core.rs +++ b/src/encryption/core.rs @@ -268,10 +268,7 @@ impl ZeroKnowledgeEncryptor { // Runtime detection fallback #[cfg(not(target_feature = "aes"))] { - if is_x86_feature_detected!("aes") { - return true; - } - false + is_x86_feature_detected!("aes") } }