mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
use while let
This commit is contained in:
parent
d9977b73aa
commit
9f2906a2f8
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue