mirror of https://git.sr.ht/~stygianentity/bincode
uncapitalize error messages (#209)
This commit is contained in:
parent
62941544ea
commit
a135fd44dc
|
|
@ -144,7 +144,7 @@ where R: BincodeRead<'de>, S: SizeLimit, E: ByteOrder {
|
||||||
|
|
||||||
let error = || {
|
let error = || {
|
||||||
ErrorKind::InvalidEncoding{
|
ErrorKind::InvalidEncoding{
|
||||||
desc: "Invalid char encoding",
|
desc: "invalid char encoding",
|
||||||
detail: None,
|
detail: None,
|
||||||
}.into()
|
}.into()
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -86,15 +86,15 @@ impl fmt::Display for ErrorKind {
|
||||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||||
match *self {
|
match *self {
|
||||||
ErrorKind::Io(ref ioerr) =>
|
ErrorKind::Io(ref ioerr) =>
|
||||||
write!(fmt, "Io: {}", ioerr),
|
write!(fmt, "io error: {}", ioerr),
|
||||||
ErrorKind::InvalidEncoding{desc, detail: None}=>
|
ErrorKind::InvalidEncoding{desc, detail: None}=>
|
||||||
write!(fmt, "InvalidEncoding: {}", desc),
|
write!(fmt, "invalid encoding: {}", desc),
|
||||||
ErrorKind::InvalidEncoding{desc, detail: Some(ref detail)}=>
|
ErrorKind::InvalidEncoding{desc, detail: Some(ref detail)}=>
|
||||||
write!(fmt, "InvalidEncoding: {} ({})", desc, detail),
|
write!(fmt, "invalid encoding: {} ({})", desc, detail),
|
||||||
ErrorKind::SequenceMustHaveLength =>
|
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 =>
|
ErrorKind::SizeLimit =>
|
||||||
write!(fmt, "SizeLimit"),
|
write!(fmt, "size limit was exceeded"),
|
||||||
ErrorKind::Custom(ref s) =>
|
ErrorKind::Custom(ref s) =>
|
||||||
s.fmt(fmt),
|
s.fmt(fmt),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue