From 4eaee0fd81d5e106f05cb77692f0f1ce7220ef19 Mon Sep 17 00:00:00 2001 From: Avinash Sajjanshetty Date: Wed, 17 Sep 2025 16:30:51 +0530 Subject: [PATCH] clean up encryption feature flag usage --- core/storage/encryption.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/core/storage/encryption.rs b/core/storage/encryption.rs index 4e54c979d..fb5406b85 100644 --- a/core/storage/encryption.rs +++ b/core/storage/encryption.rs @@ -627,6 +627,7 @@ impl From for LimboError { } #[cfg(test)] +#[cfg(feature = "encryption")] mod tests { use super::*; use rand::Rng; @@ -635,7 +636,6 @@ mod tests { macro_rules! test_cipher_wrapper { ($test_name:ident, $cipher_type:ty, $key_gen:expr, $nonce_size:literal, $message:literal) => { #[test] - #[cfg(feature = "encryption")] fn $test_name() { let key = EncryptionKey::from_hex_string(&$key_gen()).unwrap(); let cipher = <$cipher_type>::new(&key); @@ -656,7 +656,6 @@ mod tests { macro_rules! test_aes_cipher_wrapper { ($test_name:ident, $cipher_type:ty, $key_gen:expr, $nonce_size:literal, $message:literal) => { #[test] - #[cfg(feature = "encryption")] fn $test_name() { let key = EncryptionKey::from_hex_string(&$key_gen()).unwrap(); let cipher = <$cipher_type>::new(&key).unwrap(); @@ -677,7 +676,6 @@ mod tests { macro_rules! test_raw_encryption { ($test_name:ident, $cipher_mode:expr, $key_gen:expr, $nonce_size:literal, $message:literal) => { #[test] - #[cfg(feature = "encryption")] fn $test_name() { let key = EncryptionKey::from_hex_string(&$key_gen()).unwrap(); let ctx = EncryptionContext::new($cipher_mode, &key, DEFAULT_ENCRYPTED_PAGE_SIZE) @@ -726,7 +724,6 @@ mod tests { ); #[test] - #[cfg(feature = "encryption")] fn test_aes128gcm_encrypt_decrypt_round_trip() { let mut rng = rand::thread_rng(); let cipher_mode = CipherMode::Aes128Gcm; @@ -757,7 +754,6 @@ mod tests { } #[test] - #[cfg(feature = "encryption")] fn test_aes_encrypt_decrypt_round_trip() { let mut rng = rand::thread_rng(); let cipher_mode = CipherMode::Aes256Gcm; @@ -804,7 +800,6 @@ mod tests { ); #[test] - #[cfg(feature = "encryption")] fn test_aegis256_encrypt_decrypt_round_trip() { let mut rng = rand::thread_rng(); let cipher_mode = CipherMode::Aegis256; @@ -850,7 +845,6 @@ mod tests { ); #[test] - #[cfg(feature = "encryption")] fn test_aegis128x2_encrypt_decrypt_round_trip() { let mut rng = rand::thread_rng(); let cipher_mode = CipherMode::Aegis128X2; @@ -896,7 +890,6 @@ mod tests { ); #[test] - #[cfg(feature = "encryption")] fn test_aegis128l_encrypt_decrypt_round_trip() { let mut rng = rand::thread_rng(); let cipher_mode = CipherMode::Aegis128L; @@ -942,7 +935,6 @@ mod tests { ); #[test] - #[cfg(feature = "encryption")] fn test_aegis128x4_encrypt_decrypt_round_trip() { let mut rng = rand::thread_rng(); let cipher_mode = CipherMode::Aegis128X4; @@ -988,7 +980,6 @@ mod tests { ); #[test] - #[cfg(feature = "encryption")] fn test_aegis256x2_encrypt_decrypt_round_trip() { let mut rng = rand::thread_rng(); let cipher_mode = CipherMode::Aegis256X2; @@ -1034,7 +1025,6 @@ mod tests { ); #[test] - #[cfg(feature = "encryption")] fn test_aegis256x4_encrypt_decrypt_round_trip() { let mut rng = rand::thread_rng(); let cipher_mode = CipherMode::Aegis256X4;