mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11: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 initial = state.bytes();
|
||||||
|
let mut it = initial.iter();
|
||||||
|
|
||||||
for c in state.bytes() {
|
while let Some(c) = it.next() {
|
||||||
match c {
|
match c {
|
||||||
b'\t' => return HasTab(state),
|
b'\t' => return HasTab(state),
|
||||||
b'\n' => {
|
b'\n' => {
|
||||||
|
@ -327,7 +328,7 @@ fn eat_line_comment<'a>(
|
||||||
state = state.advance_newline();
|
state = state.advance_newline();
|
||||||
multiline = true;
|
multiline = true;
|
||||||
|
|
||||||
for c in state.bytes() {
|
while let Some(c) = it.next() {
|
||||||
match c {
|
match c {
|
||||||
b' ' => {
|
b' ' => {
|
||||||
state = state.advance(1);
|
state = state.advance(1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue