]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/src/docs/double_comparisons.txt
Rollup merge of #101389 - lukaslueg:rcgetmutdocs, r=m-ou-se
[rust.git] / src / tools / clippy / src / docs / double_comparisons.txt
1 ### What it does
2 Checks for double comparisons that could be simplified to a single expression.
3
4
5 ### Why is this bad?
6 Readability.
7
8 ### Example
9 ```
10 if x == y || x < y {}
11 ```
12
13 Use instead:
14
15 ```
16 if x <= y {}
17 ```