From a335fc654ca2af13bf838f8707d037e4302aa1bd Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Thu, 28 Jul 2022 09:14:11 -0700 Subject: [PATCH] style(maitake): fix clippy lints (#271) --- maitake/src/wait/cell.rs | 2 +- maitake/src/wait/map.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/maitake/src/wait/cell.rs b/maitake/src/wait/cell.rs index 6f4bfb93..dd7834cf 100644 --- a/maitake/src/wait/cell.rs +++ b/maitake/src/wait/cell.rs @@ -352,7 +352,7 @@ mod tests { assert_eq!(tick.completed, 0); assert_eq!(COMPLETED.load(Ordering::Relaxed), 0); - assert_eq!(wait.wake(), true); + assert!(wait.wake()); let tick = sched.tick(); assert_eq!(tick.completed, 1); assert_eq!(COMPLETED.load(Ordering::Relaxed), 1); diff --git a/maitake/src/wait/map.rs b/maitake/src/wait/map.rs index 0ff67e33..87bb9939 100644 --- a/maitake/src/wait/map.rs +++ b/maitake/src/wait/map.rs @@ -705,7 +705,7 @@ impl Waiter { // this check will never trigger, if we are already waiting, we should // still be waiting. let mut cursor = waiters.cursor_front_mut(); - if cursor.find(|n| &n.key == this.key).is_some() { + if cursor.any(|n| &n.key == this.key) { return duplicate(); }