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(); }