diff --git a/apps/desktop/desktop_native/core/src/biometric/linux.rs b/apps/desktop/desktop_native/core/src/biometric/linux.rs index ceb9c98f5fe..2621186b2e9 100644 --- a/apps/desktop/desktop_native/core/src/biometric/linux.rs +++ b/apps/desktop/desktop_native/core/src/biometric/linux.rs @@ -87,7 +87,7 @@ impl super::BiometricTrait for BiometricLockSystem { } async fn unlock(&self, user_id: &str, _hwnd: Vec) -> Result> { - if self.authenticate(Vec::new(), "".to_string()).await? == false { + if !(self.authenticate(Vec::new(), "".to_string()).await?) { return Err(anyhow!("Authentication failed")); } @@ -97,11 +97,11 @@ impl super::BiometricTrait for BiometricLockSystem { async fn unlock_available(&self, user_id: &str) -> Result { let secure_memory = self.secure_memory.lock().await; - return Ok(secure_memory.has(user_id)); + Ok(secure_memory.has(user_id)) } async fn has_persistent(&self, _user_id: &str) -> Result { - return Ok(false); + Ok(false) } async fn unenroll(&self, user_id: &str) -> Result<(), anyhow::Error> { diff --git a/apps/desktop/desktop_native/core/src/secure_memory/memfd_secret.rs b/apps/desktop/desktop_native/core/src/secure_memory/memfd_secret.rs index 84956b15a5b..9d7a65a7299 100644 --- a/apps/desktop/desktop_native/core/src/secure_memory/memfd_secret.rs +++ b/apps/desktop/desktop_native/core/src/secure_memory/memfd_secret.rs @@ -67,6 +67,7 @@ impl Drop for MemfdSecretKVStore { } } +#[allow(unused)] pub(super) fn is_supported() -> bool { // To test if memfd_secret is supported, we try to allocate a 1 byte and see if that // succeeds.