From 8beaf76c85693133001a0b33b867a7028e9c30b9 Mon Sep 17 00:00:00 2001 From: Eric Seppanen Date: Fri, 23 Apr 2021 14:10:43 -0700 Subject: [PATCH] SeqWait: don't do wakeups under the lock Clippy pointed out that `drop(waiters)` didn't do anything, because there was a misplaced ";" causing `waiters` to be a unit type `()`. This change makes it do what was intended: the lock should be dropped first, then the wakeups should be processed. --- zenith_utils/src/seqwait.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zenith_utils/src/seqwait.rs b/zenith_utils/src/seqwait.rs index bd94b8b350..633a862fde 100644 --- a/zenith_utils/src/seqwait.rs +++ b/zenith_utils/src/seqwait.rs @@ -63,7 +63,7 @@ impl SeqWait { // This will steal the entire waiters map. // When we drop it all waiters will be woken. - mem::take(&mut internal.waiters); + mem::take(&mut internal.waiters) // Drop the lock as we exit this scope. };