Skip to content
Snippets Groups Projects
Commit f5aad5e2 authored by Ticki's avatar Ticki
Browse files

Amend #3

parent e145bf65
No related branches found
No related tags found
No related merge requests found
......@@ -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))
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment