mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-25 13:57:55 +00:00
Fix deserializing a tuple from a sequence
This commit is contained in:
@@ -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])),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user