Skip to content

Commit e001c7a

Browse files
committed
Add a type parameter T to Event
Sets up tagged events to use the Notification trait.
1 parent 266b60d commit e001c7a

File tree

7 files changed

+596
-335
lines changed

7 files changed

+596
-335
lines changed

examples/mutex.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ impl<T> Mutex<T> {
9090
}
9191
Some(mut l) => {
9292
// Wait until a notification is received.
93-
if !l.as_mut().wait_deadline(deadline) {
94-
return None;
95-
}
93+
l.as_mut().wait_deadline(deadline)?;
9694
}
9795
}
9896
}

0 commit comments

Comments
 (0)