From f720469fd0c4dff6d92e2f778ea2f252f76dcc2e Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Tue, 7 Jan 2020 10:35:16 +0300 Subject: Use matches macro in libcore and libstd --- src/libcore/task/poll.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/libcore/task') 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 Poll { #[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` -- cgit 1.4.1-3-g733a5