summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/int_plus_one.txt
blob: 1b68f3eeb64b44f709db8fdb51c607ebf4552ca1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
### What it does
Checks for usage of `x >= y + 1` or `x - 1 >= y` (and `<=`) in a block

### Why is this bad?
Readability -- better to use `> y` instead of `>= y + 1`.

### Example
```
if x >= y + 1 {}
```

Use instead:
```
if x > y {}
```