From 3f0703862c5debd764fd5e584af1055a3de25566 Mon Sep 17 00:00:00 2001 From: Tom Birch Date: Sat, 21 Sep 2019 23:48:42 -0700 Subject: [PATCH] Fix error[E0008]: cannot bind by-move into a pattern guard --- src/net/driver/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/net/driver/mod.rs b/src/net/driver/mod.rs index 806acdbe4..5a7ea6d84 100644 --- a/src/net/driver/mod.rs +++ b/src/net/driver/mod.rs @@ -204,7 +204,7 @@ impl Watcher { { // If the operation isn't blocked, return its result. match f(self.source.as_ref().unwrap()) { - Err(err) if err.kind() == io::ErrorKind::WouldBlock => {} + Err(ref err) if err.kind() == io::ErrorKind::WouldBlock => {} res => return Poll::Ready(res), } @@ -213,7 +213,7 @@ impl Watcher { // Try running the operation again. match f(self.source.as_ref().unwrap()) { - Err(err) if err.kind() == io::ErrorKind::WouldBlock => {} + Err(ref err) if err.kind() == io::ErrorKind::WouldBlock => {} res => return Poll::Ready(res), } @@ -239,7 +239,7 @@ impl Watcher { { // If the operation isn't blocked, return its result. match f(self.source.as_ref().unwrap()) { - Err(err) if err.kind() == io::ErrorKind::WouldBlock => {} + Err(ref err) if err.kind() == io::ErrorKind::WouldBlock => {} res => return Poll::Ready(res), } @@ -248,7 +248,7 @@ impl Watcher { // Try running the operation again. match f(self.source.as_ref().unwrap()) { - Err(err) if err.kind() == io::ErrorKind::WouldBlock => {} + Err(ref err) if err.kind() == io::ErrorKind::WouldBlock => {} res => return Poll::Ready(res), }