Fixed silly bug in data tree parser.
This commit is contained in:
parent
1f4947e895
commit
7f1b1d2382
|
@ -153,6 +153,10 @@ impl<R: Read> Parser<R> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
EventParse::ReachedEnd => {
|
EventParse::ReachedEnd => {
|
||||||
|
// If we're at the end, make sure we're in a valid
|
||||||
|
// state and finish. Otherwise, let things keep
|
||||||
|
// going.
|
||||||
|
if self.eof {
|
||||||
if self.inner_opens == 0 {
|
if self.inner_opens == 0 {
|
||||||
return Ok(Event::Done);
|
return Ok(Event::Done);
|
||||||
} else {
|
} else {
|
||||||
|
@ -161,6 +165,7 @@ impl<R: Read> Parser<R> {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
EventParse::IncompleteData => {
|
EventParse::IncompleteData => {
|
||||||
// If we're at the end, it's a problem.
|
// If we're at the end, it's a problem.
|
||||||
// Otherwise, wait for more data.
|
// Otherwise, wait for more data.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user