Skip to content

Commit e71bc70

Browse files
committed
Resolve while_let_on_iterator clippy lint
error: this loop could be written as a `for` loop --> src/parse.rs:464:5 | 464 | while let Some((i, ch)) = chars.next() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for (i, ch) in &mut chars` | = note: `-D clippy::while-let-on-iterator` implied by `-D clippy::all` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
1 parent 2517d62 commit e71bc70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ fn cooked_byte_string(mut input: Cursor) -> Result<Cursor, Reject> {
461461
fn raw_string(input: Cursor) -> Result<Cursor, Reject> {
462462
let mut chars = input.char_indices();
463463
let mut n = 0;
464-
while let Some((i, ch)) = chars.next() {
464+
for (i, ch) in &mut chars {
465465
match ch {
466466
'"' => {
467467
n = i;

0 commit comments

Comments
 (0)