Skip to content

Commit da1f8cc

Browse files
committed
refactor: use cfg! macro instead of if
1 parent 02cdb8a commit da1f8cc

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

crates/common_utils/src/types/keymanager.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,7 @@ impl KeyManagerState {
9494
}
9595

9696
pub fn is_encryption_service_enabled(&self) -> bool {
97-
#[cfg(feature = "encryption_service")]
98-
{
99-
self.enabled
100-
}
101-
#[cfg(not(feature = "encryption_service"))]
102-
{
103-
false
104-
}
97+
cfg!(feature = "encryption_service") && self.enabled
10598
}
10699
}
107100

0 commit comments

Comments
 (0)