diff --git a/keystore2/src/apc.rs b/keystore2/src/apc.rs index 5d2083da..fbf94649 100644 --- a/keystore2/src/apc.rs +++ b/keystore2/src/apc.rs @@ -244,7 +244,7 @@ impl ApcManager { // If cancelled by the user or if aborted by the client. (ResponseCode::CANCELLED, _, _) | (ResponseCode::ABORTED, true, _) => { // Penalize. - let mut rate_info = state.rate_limiting.entry(uid).or_default(); + let rate_info = state.rate_limiting.entry(uid).or_default(); rate_info.counter += 1; rate_info.timestamp = start; } diff --git a/keystore2/src/entropy.rs b/keystore2/src/entropy.rs index de381875..1dcdc86f 100644 --- a/keystore2/src/entropy.rs +++ b/keystore2/src/entropy.rs @@ -29,7 +29,7 @@ struct FeederInfo { /// Register the entropy feeder as an idle callback. pub fn register_feeder() { crate::globals::ASYNC_TASK.add_idle(|shelf| { - let mut info = shelf.get_mut::(); + let info = shelf.get_mut::(); let now = Instant::now(); let feed_needed = match info.last_feed { None => true, diff --git a/keystore2/src/super_key.rs b/keystore2/src/super_key.rs index 2e8b60f2..7fc3ed48 100644 --- a/keystore2/src/super_key.rs +++ b/keystore2/src/super_key.rs @@ -823,7 +823,7 @@ impl SuperKeyManager { unlocking_sids: &[i64], ) { log::info!("Locking screen bound for user {} sids {:?}", user_id, unlocking_sids); - let mut entry = self.data.user_keys.entry(user_id).or_default(); + let entry = self.data.user_keys.entry(user_id).or_default(); if !unlocking_sids.is_empty() { if let (Some(aes), Some(ecdh)) = ( entry.screen_lock_bound.as_ref().cloned(), @@ -899,7 +899,7 @@ impl SuperKeyManager { db: &mut KeystoreDB, user_id: UserId, ) -> Result<()> { - let mut entry = self.data.user_keys.entry(user_id).or_default(); + let entry = self.data.user_keys.entry(user_id).or_default(); if let Some(biometric) = entry.biometric_unlock.as_ref() { let (key_id_guard, key_entry) = db .load_key_entry(