mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-12 15:31:07 +00:00
Merge pull request #423 from dtolnay/seq
Close the seq before failing on invalid length
This commit is contained in:
@@ -425,6 +425,7 @@ fn deserialize_seq(
|
|||||||
let $name = match $visit {
|
let $name = match $visit {
|
||||||
Some(value) => { value },
|
Some(value) => { value },
|
||||||
None => {
|
None => {
|
||||||
|
try!(visitor.end());
|
||||||
return Err(_serde::de::Error::invalid_length($index_in_seq));
|
return Err(_serde::de::Error::invalid_length($index_in_seq));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user