We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f08fcd0 commit c31861aCopy full SHA for c31861a
src/task/sleepers.rs
@@ -30,15 +30,15 @@ impl Sleepers {
30
pub fn wait(&self) {
31
let mut sleep = self.sleep.lock().unwrap();
32
33
- if self.notified.swap(false, Ordering::SeqCst) == false {
+ if !self.notified.swap(false, Ordering::SeqCst){
34
*sleep += 1;
35
let _ = self.wake.wait(sleep).unwrap();
36
}
37
38
39
/// Notifies one thread.
40
pub fn notify_one(&self) {
41
- if self.notified.load(Ordering::SeqCst) == false {
+ if !self.notified.load(Ordering::SeqCst) {
42
43
44
if *sleep > 0 {
0 commit comments