summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/double_parens.txt
blob: 260d7dd575e55049891e8cdd4aae82da7675e507 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
### What it does
Checks for unnecessary double parentheses.

### Why is this bad?
This makes code harder to read and might indicate a
mistake.

### Example
```
fn simple_double_parens() -> i32 {
    ((0))
}

foo((0));
```

Use instead:
```
fn simple_no_parens() -> i32 {
    0
}

foo(0);
```