Skip to content

Commit

Permalink
Fix clippy::needless_pass_by_ref_mut warning
Browse files Browse the repository at this point in the history
```
warning: this argument is a mutable reference, but not used mutably
   --> src/ast.rs:945:30
    |
945 |     fn peek_signature(input: &mut TokenIter) -> bool {
    |                              ^^^^^^^^^^^^^^ help: consider changing to: `&TokenIter`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
    = note: `#[warn(clippy::needless_pass_by_ref_mut)]` on by default
```
  • Loading branch information
taiki-e committed Jul 27, 2023
1 parent 1640bc1 commit 8508f47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ pub(crate) mod parsing {
}
}

fn peek_signature(input: &mut TokenIter) -> bool {
fn peek_signature(input: &TokenIter) -> bool {
let fork = &mut input.clone();
fork.parse_kw_opt("const");
fork.parse_kw_opt("async");
Expand Down

0 comments on commit 8508f47

Please sign in to comment.