Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
Avoid unused_self clippy pedantic lint in test
Browse files Browse the repository at this point in the history
    error: unused `self` argument
       --> tests/test_expr.rs:266:25
        |
    266 |         fn consume_self(self) {}
        |                         ^^^^
        |
        = note: `-D clippy::unused-self` implied by `-D clippy::pedantic`
        = help: consider refactoring to a associated function
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_self
  • Loading branch information
dtolnay committed Aug 31, 2022
1 parent 19e73a0 commit 25960a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ fn test_top_level_none_delimiter() {
struct A;

impl A {
fn consume_self(self) {}
fn consume_self(self) {
let _ = self;
}
}

clone!(&A).consume_self();
Expand Down

0 comments on commit 25960a4

Please sign in to comment.