From 392fa6c489ffb1f0178dc7377f894cfaf2d4744a Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 14 Apr 2024 14:42:59 -0700 Subject: [PATCH] Ignore needless_pass_by_value pedantic clippy lint in test warning: this argument is passed by value, but not consumed in the function body --> tests/test.rs:101:24 | 101 | fn assert(literal: Literal, expected: &str) { | ^^^^^^^ help: consider taking a reference instead: `&Literal` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value = note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_pass_by_value)]` warning: this argument is passed by value, but not consumed in the function body --> tests/test.rs:149:24 | 149 | fn assert(literal: Literal, expected: &str) { | ^^^^^^^ help: consider taking a reference instead: `&Literal` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value warning: this argument is passed by value, but not consumed in the function body --> tests/test.rs:167:24 | 167 | fn assert(literal: Literal, expected: &str) { | ^^^^^^^ help: consider taking a reference instead: `&Literal` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value warning: this argument is passed by value, but not consumed in the function body --> tests/test.rs:194:24 | 194 | fn assert(literal: Literal, expected: &str) { | ^^^^^^^ help: consider taking a reference instead: `&Literal` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value warning: this argument is passed by value, but not consumed in the function body --> tests/test.rs:265:24 | 265 | fn assert(literal: Literal, expected: &str) { | ^^^^^^^ help: consider taking a reference instead: `&Literal` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value warning: this argument is passed by value, but not consumed in the function body --> tests/test.rs:281:24 | 281 | fn assert(literal: Literal, expected: &str) { | ^^^^^^^ help: consider taking a reference instead: `&Literal` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value warning: this argument is passed by value, but not consumed in the function body --> tests/test.rs:320:24 | 320 | fn assert(literal: Literal, expected: &str) { | ^^^^^^^ help: consider taking a reference instead: `&Literal` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value --- tests/test.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test.rs b/tests/test.rs index ac42750..3923d33 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -1,6 +1,7 @@ #![allow( clippy::assertions_on_result_states, clippy::items_after_statements, + clippy::needless_pass_by_value, clippy::needless_raw_string_hashes, clippy::non_ascii_literal, clippy::octal_escapes