BUG: Fix serde code for push change

This commit is contained in:
bluss
2017-07-30 14:12:24 +02:00
parent 3a235d7206
commit 1d08021107
+1 -1
View File
@@ -977,7 +977,7 @@ impl<'de, T: Deserialize<'de>, A: Array<Item=T>> Deserialize<'de> for ArrayVec<A
let mut values = ArrayVec::<A>::new(); let mut values = ArrayVec::<A>::new();
while let Some(value) = try!(seq.next_element()) { while let Some(value) = try!(seq.next_element()) {
if let Some(_) = values.push(value) { if let Err(_) = values.try_push(value) {
return Err(SA::Error::invalid_length(A::capacity() + 1, &self)); return Err(SA::Error::invalid_length(A::capacity() + 1, &self));
} }
} }