From b08b44c046f35a9bc4bf9cc6e9bf744c92df117e Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 7 Mar 2019 13:48:58 +0100 Subject: [PATCH] protocol: remove redundant WouldBlock handling The packet reading code already translates this to a bool. Signed-off-by: Wolfgang Bumiller --- proxmox-protocol/src/common.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/proxmox-protocol/src/common.rs b/proxmox-protocol/src/common.rs index 8c67f41d..244aeeb5 100644 --- a/proxmox-protocol/src/common.rs +++ b/proxmox-protocol/src/common.rs @@ -106,14 +106,6 @@ where match self.poll_data_do() { Ok(has_packet) => Ok(has_packet), Err(e) => { - // To support AsyncRead/AsyncWrite we do not enter a failed - // state when we read from a non-blocking source which fails - // with WouldBlock. - if let Some(ioe) = e.downcast_ref::() { - if ioe.kind() == io::ErrorKind::WouldBlock { - return Ok(false); - } - } self.error = true; Err(e) }