Skip to content

Commit

Permalink
Ignore needless_pass_by_ref_mut clippy lint in test suite
Browse files Browse the repository at this point in the history
    warning: this argument is a mutable reference, but not used mutably
       --> tests/ffi/lib.rs:524:34
        |
    524 | fn r_return_mut_rust_vec(shared: &mut ffi::Shared) -> &mut Vec<u8> {
        |                                  ^^^^^^^^^^^^^^^^ help: consider changing to: `&ffi::Shared`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
        = note: `-W clippy::needless-pass-by-ref-mut` implied by `-W clippy::all`

    warning: this argument is a mutable reference, but not used mutably
       --> tests/test.rs:222:24
        |
    222 |     fn callback_mut(s: &mut String) {
        |                        ^^^^^^^^^^^ help: consider changing to: `&String`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
        = note: `-W clippy::needless-pass-by-ref-mut` implied by `-W clippy::all`
  • Loading branch information
dtolnay committed Jul 18, 2023
1 parent e8d9769 commit 1a608a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/ffi/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
clippy::missing_safety_doc,
clippy::must_use_candidate,
clippy::needless_lifetimes,
clippy::needless_pass_by_ref_mut,
clippy::needless_pass_by_value,
clippy::ptr_arg,
clippy::trivially_copy_pass_by_ref,
Expand Down
1 change: 1 addition & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
clippy::cast_possible_wrap,
clippy::float_cmp,
clippy::needless_pass_by_value,
clippy::needless_pass_by_ref_mut,
clippy::unit_cmp,
clippy::unseparated_literal_suffix
)]
Expand Down

0 comments on commit 1a608a7

Please sign in to comment.