Remove ambiguities in serde expecting messages.

This commit is contained in:
David Ross
2017-06-14 21:55:57 -07:00
parent 1b0168bb6f
commit 704f237282
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -351,7 +351,7 @@ impl<'de, A: Array<Item=u8>> Deserialize<'de> for ArrayString<A> {
type Value = ArrayString<A>; type Value = ArrayString<A>;
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { 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<E>(self, v: &str) -> Result<Self::Value, E> fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
+1 -1
View File
@@ -849,7 +849,7 @@ impl<'de, T: Deserialize<'de>, A: Array<Item=T>> Deserialize<'de> for ArrayVec<A
type Value = ArrayVec<A>; type Value = ArrayVec<A>;
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { 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<SA>(self, mut seq: SA) -> Result<Self::Value, SA::Error> fn visit_seq<SA>(self, mut seq: SA) -> Result<Self::Value, SA::Error>