Fix deserializing a tuple from a sequence

This commit is contained in:
Erick Tryzelaar 2014-08-14 19:03:23 -07:00
parent 9d1f777282
commit dce88b74da

View File

@ -305,7 +305,8 @@ pub trait Deserializer<E>: Iterator<Result<Token, E>> {
fn expect_tuple_start(&mut self, token: Token) -> Result<uint, E> {
match token {
TupleStart(len) => Ok(len),
token => Err(self.syntax_error(token, [TupleStartKind])),
SeqStart(len) => Ok(len),
token => Err(self.syntax_error(token, [TupleStartKind, SeqStartKind])),
}
}