blob: b96c2eb151d4161b67aa4bd2a093f95caa8b657a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
### What it does
Checks for uses of `std::mem::size_of::<T>() * 8` when
`T::BITS` is available.
### Why is this bad?
Can be written as the shorter `T::BITS`.
### Example
```
std::mem::size_of::<usize>() * 8;
```
Use instead:
```
usize::BITS as usize;
```
|