blob: 70947aceee77b7e4ed3590f178c539cbe09febd2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
### What it does
Detects cases where a whole-number literal float is being rounded, using
the `floor`, `ceil`, or `round` methods.
### Why is this bad?
This is unnecessary and confusing to the reader. Doing this is probably a mistake.
### Example
```
let x = 1f32.ceil();
```
Use instead:
```
let x = 1f32;
```
|