Skip to content

Commit 07b8608

Browse files
committed
FIX: Update serde impls for Array changes
1 parent 35a085d commit 07b8608

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/array_string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ impl<'de, A> Deserialize<'de> for ArrayString<A>
547547
type Value = ArrayString<A>;
548548

549549
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
550-
write!(formatter, "a string no more than {} bytes long", A::capacity())
550+
write!(formatter, "a string no more than {} bytes long", A::CAPACITY)
551551
}
552552

553553
fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ impl<'de, T: Deserialize<'de>, A: Array<Item=T>> Deserialize<'de> for ArrayVec<A
11011101
type Value = ArrayVec<A>;
11021102

11031103
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
1104-
write!(formatter, "an array with no more than {} items", A::capacity())
1104+
write!(formatter, "an array with no more than {} items", A::CAPACITY)
11051105
}
11061106

11071107
fn visit_seq<SA>(self, mut seq: SA) -> Result<Self::Value, SA::Error>
@@ -1111,7 +1111,7 @@ impl<'de, T: Deserialize<'de>, A: Array<Item=T>> Deserialize<'de> for ArrayVec<A
11111111

11121112
while let Some(value) = try!(seq.next_element()) {
11131113
if let Err(_) = values.try_push(value) {
1114-
return Err(SA::Error::invalid_length(A::capacity() + 1, &self));
1114+
return Err(SA::Error::invalid_length(A::CAPACITY + 1, &self));
11151115
}
11161116
}
11171117

0 commit comments

Comments
 (0)