Rust upgrade: fix deprecated methods.

This commit is contained in:
DevOps
2014-12-25 01:35:11 +03:00
parent 782320b849
commit f3d446308d
4 changed files with 7 additions and 8 deletions

View File

@@ -72,7 +72,7 @@ impl ClientStream for TcpStream {
fn get_reply(&mut self) -> SmtpResult {
let response = try!(self.read_into_string());
match from_str::<Response>(response.as_slice()) {
match response.as_slice().parse::<Response>() {
Some(response) => Ok(response),
None => Err(FromError::from_error("Could not parse response"))
}