about summary refs log tree commit diff
path: root/src/docs/vec_resize_to_zero.txt
blob: 0b92686772bb089fdc6b1c48f10f93c24b5f3a3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
### What it does
Finds occurrences of `Vec::resize(0, an_int)`

### Why is this bad?
This is probably an argument inversion mistake.

### Example
```
vec!(1, 2, 3, 4, 5).resize(0, 5)
```

Use instead:
```
vec!(1, 2, 3, 4, 5).clear()
```