We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ffe27f commit bd10591Copy full SHA for bd10591
1 file changed
backends/src/foundry/mod.rs
@@ -505,12 +505,12 @@ impl LocWithOptionalSemicolon for Statement {
505
let loc = self.loc();
506
match loc {
507
Loc::File(file_no, start, mut end) => {
508
- let mut chars = contents.chars().skip(end).peekable();
509
- while chars.peek().copied().is_some_and(char::is_whitespace) {
+ let mut bytes = contents.bytes().skip(end).peekable();
+ while bytes.peek().is_some_and(u8::is_ascii_whitespace) {
510
end += 1;
511
- let _: Option<char> = chars.next();
+ let _: Option<u8> = bytes.next();
512
}
513
- if chars.next() == Some(';') {
+ if bytes.next() == Some(b';') {
514
Loc::File(file_no, start, end + 1)
515
} else {
516
loc
0 commit comments