Skip to content

Commit

Permalink
Replace 2 inconsistent ASCII checks with is_ascii()
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 9, 2023
1 parent 9c812bc commit ab053d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ fn skip_whitespace(input: Cursor) -> Cursor {
s = s.advance(1);
continue;
}
b if b <= 0x7f => {}
b if b.is_ascii() => {}
_ => {
let ch = s.chars().next().unwrap();
if is_whitespace(ch) {
Expand Down Expand Up @@ -456,7 +456,7 @@ fn cooked_byte_string(mut input: Cursor) -> Result<Cursor, Reject> {
}
_ => break,
},
b if b < 0x80 => {}
b if b.is_ascii() => {}
_ => break,
}
}
Expand Down

0 comments on commit ab053d3

Please sign in to comment.