Skip to content

Commit

Permalink
Do not use Default implementation to construct parsers
Browse files Browse the repository at this point in the history
This is not generic code and it is more clear when we construct them with explicit state
  • Loading branch information
Mingun committed Jul 6, 2024
1 parent 28c031d commit be86267
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ macro_rules! read_until_close {
},
// `<?` - processing instruction
Ok(Some(b'?')) => match $reader
.read_with(PiParser::default(), $buf, &mut $self.state.offset)
.read_with(PiParser(false), $buf, &mut $self.state.offset)
$(.$await)?
{
Ok(bytes) => $self.state.emit_question_mark(bytes),
Expand All @@ -373,7 +373,7 @@ macro_rules! read_until_close {
},
// `<...` - opening or self-closed tag
Ok(Some(_)) => match $reader
.read_with(ElementParser::default(), $buf, &mut $self.state.offset)
.read_with(ElementParser::Outside, $buf, &mut $self.state.offset)
$(.$await)?
{
Ok(bytes) => Ok($self.state.emit_start(bytes)),
Expand Down

0 comments on commit be86267

Please sign in to comment.