blob: 48d16ca655232600b9bfc489bf78319ab468441b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
### What it does
Checks for unit (`()`) expressions that can be removed.
### Why is this bad?
Such expressions add no value, but can make the code
less readable. Depending on formatting they can make a `break` or `return`
statement look like a function call.
### Example
```
fn return_unit() -> () {
()
}
```
is equivalent to
```
fn return_unit() {}
```
|