diff options
Diffstat (limited to 'src/libcore/task/poll.rs')
| -rw-r--r-- | src/libcore/task/poll.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libcore/task/poll.rs b/src/libcore/task/poll.rs index d567ae54577..b3a4bd20b8f 100644 --- a/src/libcore/task/poll.rs +++ b/src/libcore/task/poll.rs @@ -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` |
