Close the seq before failing on invalid length

Equivalent to what 0f9a930 does for maps.
This commit is contained in:
David Tolnay 2016-07-05 10:08:27 -07:00
parent 431cbe48b7
commit f25e6d3ea9
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -425,6 +425,7 @@ fn deserialize_seq(
let $name = match $visit {
Some(value) => { value },
None => {
try!(visitor.end());
return Err(_serde::de::Error::invalid_length($index_in_seq));
}
};