From 704f2372820d83f634bb99731fdc1d2aa1823059 Mon Sep 17 00:00:00 2001 From: David Ross Date: Wed, 14 Jun 2017 21:55:57 -0700 Subject: [PATCH] Remove ambiguities in serde expecting messages. --- src/array_string.rs | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/array_string.rs b/src/array_string.rs index b506e6a..af09023 100644 --- a/src/array_string.rs +++ b/src/array_string.rs @@ -351,7 +351,7 @@ impl<'de, A: Array> Deserialize<'de> for ArrayString { type Value = ArrayString; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - write!(formatter, "a string with no more than {} elements", A::capacity()) + write!(formatter, "a string no more than {} bytes long", A::capacity()) } fn visit_str(self, v: &str) -> Result diff --git a/src/lib.rs b/src/lib.rs index 1e921e1..add7558 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -849,7 +849,7 @@ impl<'de, T: Deserialize<'de>, A: Array> Deserialize<'de> for ArrayVec; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - write!(formatter, "an array with no more than {} elements", A::capacity()) + write!(formatter, "an array with no more than {} items", A::capacity()) } fn visit_seq(self, mut seq: SA) -> Result