From 827a7c960cdfc6285afa5d780a6c0e273019ea09 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 31 Mar 2017 18:45:00 -0700 Subject: Fix backcompat with array definitions --- src/de.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/de.rs b/src/de.rs index 1406f35..1fb2eb5 100644 --- a/src/de.rs +++ b/src/de.rs @@ -634,7 +634,12 @@ impl<'a> Deserializer<'a> { } else { loop { match self.next()? { - Some(Token::RightBracket) | + Some(Token::RightBracket) => { + if array { + self.eat(Token::RightBracket)?; + } + break + } Some(Token::Newline) | None => break, _ => {} -- cgit v1.2.3