mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-23 16:28:02 +00:00
add tests to deserializing sequences into a tuple
This commit is contained in:
@@ -199,13 +199,13 @@ pub trait Deserializer<E>: Iterator<Result<Token, E>> {
|
||||
fn expect_null(&mut self, token: Token) -> Result<(), E> {
|
||||
match token {
|
||||
Null => Ok(()),
|
||||
TupleStart(_) => {
|
||||
TupleStart(_) | SeqStart(_) => {
|
||||
match try!(self.expect_token()) {
|
||||
End => Ok(()),
|
||||
token => Err(self.syntax_error(token, [EndKind])),
|
||||
}
|
||||
}
|
||||
token => Err(self.syntax_error(token, [NullKind, TupleStartKind])),
|
||||
token => Err(self.syntax_error(token, [NullKind, TupleStartKind, SeqStartKind])),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user