chore: 修复 clippy 错误(loop never loops → if-let)并应用自动修复

This commit is contained in:
2026-06-10 10:17:25 +08:00
parent 19dc54f842
commit f7d0781090
15 changed files with 60 additions and 123 deletions
+2 -3
View File
@@ -215,12 +215,11 @@ impl ApprovalManager {
let mut map = self.pending.lock().await;
for (uid, i, _) in expired.iter().rev() {
if let Some(entries) = map.get_mut(uid) {
if *i < entries.len() {
if let Some(entries) = map.get_mut(uid)
&& *i < entries.len() {
let entry = entries.remove(*i);
let _ = entry.sender.send(ApprovalDecision::Expired);
}
}
}
map.retain(|_, v| !v.is_empty());
}