Skip to content

Commit

Permalink
Merge pull request #423 from dtolnay/seq
Browse files Browse the repository at this point in the history
Close the seq before failing on invalid length
  • Loading branch information
oli-obk authored Jul 5, 2016
2 parents 431cbe4 + f25e6d3 commit 7ffb74f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions serde_codegen/src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
};
Expand Down

0 comments on commit 7ffb74f

Please sign in to comment.