Fix deserializing a tuple from a sequence
This commit is contained in:
parent
9d1f777282
commit
dce88b74da
@ -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])),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user