blob: 8b1febf1455fdc359e520db3c9f95f5c14bdb282 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
### What it does
Checks for usage of `Box<T>` where an unboxed `T` would
work fine.
### Why is this bad?
This is an unnecessary allocation, and bad for
performance. It is only necessary to allocate if you wish to move the box
into something.
### Example
```
fn foo(x: Box<u32>) {}
```
Use instead:
```
fn foo(x: u32) {}
```
|