Use matches macro in libcore and libstd
This commit is contained in:
parent
aa0769b92e
commit
f720469fd0
12 changed files with 29 additions and 118 deletions
|
|
@ -39,10 +39,7 @@ impl<T> Poll<T> {
|
|||
#[inline]
|
||||
#[stable(feature = "futures_api", since = "1.36.0")]
|
||||
pub fn is_ready(&self) -> bool {
|
||||
match *self {
|
||||
Poll::Ready(_) => true,
|
||||
Poll::Pending => false,
|
||||
}
|
||||
matches!(*self, Poll::Ready(_))
|
||||
}
|
||||
|
||||
/// Returns `true` if this is `Poll::Pending`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue