This commit is contained in:
Ticki 2016-03-08 11:58:48 +01:00
parent e145bf6592
commit f5aad5e2b1
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ pub enum TerminalError {
StdinError,
/// Failed to parse number.
ParseError,
/// Failed to read unicode encoded data.
/// Invalid or malformed Unicode.
UnicodeError
}
@ -29,7 +29,7 @@ impl TerminalError {
TerminalError::StdoutError => "Failed to write to stdout.",
TerminalError::StdinError => "Failed to read from stdin.",
TerminalError::ParseError => "Failed to parse number.",
TerminalError::UnicodeError => "Failed to read unicode encoded data.",
TerminalError::UnicodeError => "Invalid or malformed Unicode.",
}
}
}

View File

@ -24,7 +24,7 @@ impl<R: Read> ReadExt for R {
}
}
let passwd = try!(String::from_utf8(passbuf).map_err(|_| TerminalError::UnicodeError ));
let passwd = try!(String::from_utf8(passbuf).map_err(|_| TerminalError::UnicodeError));
Ok(Some(passwd))
}