about summary refs log tree commit diff
path: root/src/libcore/task
diff options
context:
space:
mode:
authorIgor Aleksanov <popzxc@yandex.ru>2020-01-07 10:35:16 +0300
committerIgor Aleksanov <popzxc@yandex.ru>2020-01-08 07:10:28 +0300
commitf720469fd0c4dff6d92e2f778ea2f252f76dcc2e (patch)
treeeed0768e1946a78b266025d661016f190795d871 /src/libcore/task
parentaa0769b92e60f5298f0b6326b8654c9b04351b98 (diff)
downloadrust-f720469fd0c4dff6d92e2f778ea2f252f76dcc2e.tar.gz
rust-f720469fd0c4dff6d92e2f778ea2f252f76dcc2e.zip
Use matches macro in libcore and libstd
Diffstat (limited to 'src/libcore/task')
-rw-r--r--src/libcore/task/poll.rs5
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`