Skip to content

Commit

Permalink
Fix needless_borrow clippy lint in new control character test
Browse files Browse the repository at this point in the history
    warning: this expression creates a reference which is immediately dereferenced by the compiler
        --> tests/test.rs:2515:9
         |
    2515 |         &"\"\t\n\r\"",
         |         ^^^^^^^^^^^^^ help: change this to: `"\"\t\n\r\""`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
         = note: `-W clippy::needless-borrow` implied by `-W clippy::all`
         = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]`
  • Loading branch information
dtolnay committed Aug 11, 2024
1 parent 859ead8 commit 346189a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2512,7 +2512,7 @@ fn test_control_character_search() {

// Multiple occurrences
test_parse_err::<String>(&[(
&"\"\t\n\r\"",
"\"\t\n\r\"",
"control character (\\u0000-\\u001F) found while parsing a string at line 1 column 2",
)]);
}

0 comments on commit 346189a

Please sign in to comment.