From 7dc7a94560574ccb4055e04a99bbf0e00d4bf63f Mon Sep 17 00:00:00 2001 From: Ty Overby Date: Fri, 13 Oct 2017 08:59:08 -0700 Subject: [PATCH] improve size limit error display --- src/internal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal.rs b/src/internal.rs index b85aed9..35a5863 100644 --- a/src/internal.rs +++ b/src/internal.rs @@ -108,7 +108,7 @@ impl fmt::Display for ErrorKind { "bincode can only encode sequences and maps that have a knowable size ahead of time." ) } - ErrorKind::SizeLimit => write!(fmt, "size limit was exceeded"), + ErrorKind::SizeLimit => write!(fmt, self.description()), ErrorKind::DeserializeAnyNotSupported => { write!( fmt,