1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-05 11:13:44 +00:00

Fix clippy warns

This commit is contained in:
Bernd Schoolmann
2025-08-28 14:09:29 +02:00
parent 2f21db2dae
commit 08e0e68a52
2 changed files with 4 additions and 3 deletions

View File

@@ -87,7 +87,7 @@ impl super::BiometricTrait for BiometricLockSystem {
}
async fn unlock(&self, user_id: &str, _hwnd: Vec<u8>) -> Result<Vec<u8>> {
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<bool> {
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<bool> {
return Ok(false);
Ok(false)
}
async fn unenroll(&self, user_id: &str) -> Result<(), anyhow::Error> {

View File

@@ -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.