Fix: clippy && fmt

Signed-off-by: junxiang Mu <1948535941@qq.com>
This commit is contained in:
junxiang Mu
2025-08-09 21:16:56 +08:00
parent 4811632751
commit b7e56ed92c
2 changed files with 9 additions and 16 deletions
+1 -7
View File
@@ -97,13 +97,7 @@ impl LocalLockMap {
guard.remove(&k);
}
let wait = if due.is_empty() {
next_deadline.and_then(|dl| {
if dl > now {
Some(dl - now)
} else {
Some(Duration::from_millis(0))
}
})
next_deadline.map(|dl| if dl > now { dl - now } else { Duration::from_millis(0) })
} else {
Some(Duration::from_millis(0))
};