diff --git a/serde_codegen/src/de.rs b/serde_codegen/src/de.rs index be3ff6edd..92aef10b5 100644 --- a/serde_codegen/src/de.rs +++ b/serde_codegen/src/de.rs @@ -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)); } };