uncapitalize error messages (#209)

This commit is contained in:
Ty Overby 2017-10-11 09:53:36 -07:00 committed by GitHub
parent 62941544ea
commit a135fd44dc
2 changed files with 6 additions and 6 deletions

View File

@ -144,7 +144,7 @@ where R: BincodeRead<'de>, S: SizeLimit, E: ByteOrder {
let error = || {
ErrorKind::InvalidEncoding{
desc: "Invalid char encoding",
desc: "invalid char encoding",
detail: None,
}.into()
};

View File

@ -86,15 +86,15 @@ impl fmt::Display for ErrorKind {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
match *self {
ErrorKind::Io(ref ioerr) =>
write!(fmt, "Io: {}", ioerr),
write!(fmt, "io error: {}", ioerr),
ErrorKind::InvalidEncoding{desc, detail: None}=>
write!(fmt, "InvalidEncoding: {}", desc),
write!(fmt, "invalid encoding: {}", desc),
ErrorKind::InvalidEncoding{desc, detail: Some(ref detail)}=>
write!(fmt, "InvalidEncoding: {} ({})", desc, detail),
write!(fmt, "invalid encoding: {} ({})", desc, detail),
ErrorKind::SequenceMustHaveLength =>
write!(fmt, "Bincode can only encode sequences and maps that have a knowable size ahead of time."),
write!(fmt, "bincode can only encode sequences and maps that have a knowable size ahead of time."),
ErrorKind::SizeLimit =>
write!(fmt, "SizeLimit"),
write!(fmt, "size limit was exceeded"),
ErrorKind::Custom(ref s) =>
s.fmt(fmt),
}