Skip to content

Commit f67945f

Browse files
committed
Merge branch 'master' of github.com:maciejhirsz/json-rust into 0.8.0
2 parents 3ac2e74 + 4398d77 commit f67945f

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/parser.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,7 @@ impl<'a> Parser<'a> {
218218

219219
#[inline(always)]
220220
fn checked_next_byte(&mut self) -> Option<u8> {
221-
if self.left_over.is_some() {
222-
let byte = self.left_over;
223-
self.left_over = None;
224-
return byte;
225-
}
226-
227-
self.next_byte()
221+
self.left_over.take().or_else(|| self.next_byte())
228222
}
229223

230224
#[inline(always)]

0 commit comments

Comments
 (0)