From 91bcdf1a4e5d4096d9b3d16d5a57246fb58667f9 Mon Sep 17 00:00:00 2001 From: Matt McCoy Date: Tue, 21 Jun 2016 16:12:43 -0400 Subject: [PATCH] Removing uneeded wrapper around read_response in run_command --- src/client.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/client.rs b/src/client.rs index 21d36fb..42077f9 100644 --- a/src/client.rs +++ b/src/client.rs @@ -256,12 +256,7 @@ impl Client { Err(_) => return Err(Error::new(ErrorKind::Other, "Failed to write")), }; - let ret = match self.read_response() { - Ok(lines) => Ok(lines), - Err(_) => Err(Error::new(ErrorKind::Other, "Failed to read")), - }; - - return ret; + self.read_response() } fn parse_response_ok(&mut self, lines: Vec) -> Result<()> {