Amend #3
This commit is contained in:
parent
e145bf6592
commit
f5aad5e2b1
|
@ -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.",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue