Skip to content

Commit

Permalink
Tail recurse on parse_escape
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 25, 2021
1 parent 48dad22 commit 7911e70
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -908,9 +908,7 @@ fn parse_escape<'de, R: Read<'de>>(

// The \ prior to this byte started an escape sequence,
// so we need to parse that now.
parse_escape(read, validate, scratch)?;

return Ok(());
return parse_escape(read, validate, scratch);
}
read.discard();

Expand Down

0 comments on commit 7911e70

Please sign in to comment.