use while let

This commit is contained in:
Folkert 2022-05-14 23:46:52 +02:00
parent d9977b73aa
commit 9f2906a2f8
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -311,8 +311,9 @@ fn eat_line_comment<'a>(
};
let initial = state.bytes();
let mut it = initial.iter();
for c in state.bytes() {
while let Some(c) = it.next() {
match c {
b'\t' => return HasTab(state),
b'\n' => {
@ -327,7 +328,7 @@ fn eat_line_comment<'a>(
state = state.advance_newline();
multiline = true;
for c in state.bytes() {
while let Some(c) = it.next() {
match c {
b' ' => {
state = state.advance(1);