blob: a8d0fc7598954e911a026def6fd14f5f55ade3a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
### What it does
Checks methods that contain a `self` argument but don't use it
### Why is this bad?
It may be clearer to define the method as an associated function instead
of an instance method if it doesn't require `self`.
### Example
```
struct A;
impl A {
fn method(&self) {}
}
```
Could be written:
```
struct A;
impl A {
fn method() {}
}
```
|