Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Commit

Permalink
Use direct call to underlying reader because we know, that we don't h…
Browse files Browse the repository at this point in the history
…ave peeked event

This allow further refactoring for supporting sequences because resolves lifetime issue
that otherwise would be introduced in one of following commits
  • Loading branch information
Mingun committed May 6, 2022
1 parent 062871e commit 6a3fd90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/de/mod.rs
Expand Up @@ -260,7 +260,7 @@ where

fn peek(&mut self) -> Result<&DeEvent<'de>, DeError> {
if self.peek.is_none() {
self.peek = Some(self.next()?);
self.peek = Some(self.reader.next()?);
}
match self.peek.as_ref() {
Some(v) => Ok(v),
Expand Down

0 comments on commit 6a3fd90

Please sign in to comment.