blob: 3a026388183e1cb754e65d398323f932543a6034 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
### What it does
Checking for imports with single component use path.
### Why is this bad?
Import with single component use path such as `use cratename;`
is not necessary, and thus should be removed.
### Example
```
use regex;
fn main() {
regex::Regex::new(r"^\d{4}-\d{2}-\d{2}$").unwrap();
}
```
Better as
```
fn main() {
regex::Regex::new(r"^\d{4}-\d{2}-\d{2}$").unwrap();
}
```
|