diff --git a/Cargo.toml b/Cargo.toml index 3ab98ec..8cc9120 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "smtp" -version = "0.1.1" +version = "0.1.2" description = "Simple SMTP client" readme = "README.md" documentation = "http://amousset.me/rust-smtp/smtp/" diff --git a/src/response.rs b/src/response.rs index acc7635..416fc6d 100644 --- a/src/response.rs +++ b/src/response.rs @@ -2,7 +2,7 @@ use std::str::FromStr; use std::fmt::{Display, Formatter, Result}; -use std::result::Result as RResult; +use std::result; use self::Severity::*; use self::Category::*; @@ -23,7 +23,7 @@ pub enum Severity { impl FromStr for Severity { type Err = Error; - fn from_str(s: &str) -> RResult { + fn from_str(s: &str) -> result::Result { match s { "2" => Ok(PositiveCompletion), "3" => Ok(PositiveIntermediate), @@ -66,7 +66,7 @@ pub enum Category { impl FromStr for Category { type Err = Error; - fn from_str(s: &str) -> RResult { + fn from_str(s: &str) -> result::Result { match s { "0" => Ok(Syntax), "1" => Ok(Information), @@ -109,7 +109,7 @@ impl FromStr for Code { type Err = Error; #[inline] - fn from_str(s: &str) -> RResult { + fn from_str(s: &str) -> result::Result { if s.len() == 3 { match (s[0..1].parse::(), s[1..2].parse::(), s[2..3].parse::()) { (Ok(severity), Ok(category), Ok(detail)) => Ok(Code {severity: severity, category: category, detail: detail}), @@ -157,7 +157,7 @@ impl ResponseParser { } /// Parses a line and return a `bool` indicating if there are more lines to come - pub fn read_line(&mut self, line: &str) -> RResult { + pub fn read_line(&mut self, line: &str) -> result::Result { if line.len() < 3 { return Err(Error::ResponseParsingError("Wrong code length (should be 3 digit)"));