-
Notifications
You must be signed in to change notification settings - Fork 818
Closed
Labels
Description
From what I can tell, the only reason these exists is to be used in the implementation of Sub and SubAssign.
impl<T: Into<Ready>> ops::Sub<T> for Ready {
type Output = Ready;
fn sub(self, other: T) -> Ready {
Ready(self.0 & !other.into().0)
}
}
impl<T: Into<Ready>> ops::SubAssign<T> for Ready {
fn sub_assign(&mut self, other: T) {
self.0 &= !other.into().0;
}
}Other than in Sub, it never makes sense to apply Not to a Ready. You would never call Poll::register and pass the Not of a Ready, for example. Let's reimplement Sub in a different way and remove the semantically meaningless Not operation.
Applies to Ready, UnixReady, FuchsiaReady, and PollOpt.
Reactions are currently unavailable