Removing uneeded wrapper around read_response in run_command

This commit is contained in:
Matt McCoy 2016-06-21 16:12:43 -04:00
parent 1cf02a409c
commit 91bcdf1a4e

View file

@ -256,12 +256,7 @@ impl<T: Read+Write> Client<T> {
Err(_) => return Err(Error::new(ErrorKind::Other, "Failed to write")), Err(_) => return Err(Error::new(ErrorKind::Other, "Failed to write")),
}; };
let ret = match self.read_response() { self.read_response()
Ok(lines) => Ok(lines),
Err(_) => Err(Error::new(ErrorKind::Other, "Failed to read")),
};
return ret;
} }
fn parse_response_ok(&mut self, lines: Vec<String>) -> Result<()> { fn parse_response_ok(&mut self, lines: Vec<String>) -> Result<()> {