aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-03-31 18:45:00 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-03-31 18:45:00 -0700
commit827a7c960cdfc6285afa5d780a6c0e273019ea09 (patch)
treed538ae7dd77afd8d5ba7b62c1838c6a7c0630f76 /src
parent290973410b8519f1850a0faf98e9028e25d50510 (diff)
downloadmilf-rs-827a7c960cdfc6285afa5d780a6c0e273019ea09.tar.gz
milf-rs-827a7c960cdfc6285afa5d780a6c0e273019ea09.zip
Fix backcompat with array definitions
Diffstat (limited to 'src')
-rw-r--r--src/de.rs7
1 files changed, 6 insertions, 1 deletions
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,
_ => {}