mirror of https://github.com/rust-lang/async-book
🚨 Fix a rust-clippy warning
* https://rust-lang.github.io/rust-clippy/master/#redundant_pattern_matching
This commit is contained in:
parent
a86d9c5f73
commit
906fdef2ef
|
@ -97,7 +97,7 @@ impl Executor {
|
|||
// `Pin<Box<dyn Future<Output = T> + Send + 'static>>`.
|
||||
// We can get a `Pin<&mut dyn Future + Send + 'static>`
|
||||
// from it by calling the `Pin::as_mut` method.
|
||||
if let Poll::Pending = future.as_mut().poll(context) {
|
||||
if future.as_mut().poll(context).is_pending() {
|
||||
// We're not done processing the future, so put it
|
||||
// back in its task to be run again in the future.
|
||||
*future_slot = Some(future);
|
||||
|
|
Loading…
Reference in New Issue