From a135fd44dc32937b7a238d5b92a3422419fcac80 Mon Sep 17 00:00:00 2001 From: Ty Overby Date: Wed, 11 Oct 2017 09:53:36 -0700 Subject: [PATCH] uncapitalize error messages (#209) --- src/de/mod.rs | 2 +- src/internal.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/de/mod.rs b/src/de/mod.rs index ec3cb17..904a54c 100644 --- a/src/de/mod.rs +++ b/src/de/mod.rs @@ -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() }; diff --git a/src/internal.rs b/src/internal.rs index 78e4cfa..0297e59 100644 --- a/src/internal.rs +++ b/src/internal.rs @@ -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), }