19 lines
764 B
Plaintext
19 lines
764 B
Plaintext
error: calls to `reverse` immediately after creation
|
|
--> $DIR/reserve_after_initialization.rs:5:5
|
|
|
|
|
LL | / let mut v1: Vec<usize> = vec![];
|
|
LL | | v1.reserve(10);
|
|
| |___________________^ help: consider using `Vec::with_capacity(space_hint)`: `let mut v1: Vec<usize> = Vec::with_capacity(10);`
|
|
|
|
|
= note: `-D clippy::reserve-after-initialization` implied by `-D warnings`
|
|
|
|
error: calls to `reverse` immediately after creation
|
|
--> $DIR/reserve_after_initialization.rs:10:5
|
|
|
|
|
LL | / let mut v2: Vec<usize> = vec![];
|
|
LL | | v2.reserve(capacity);
|
|
| |_________________________^ help: consider using `Vec::with_capacity(space_hint)`: `let mut v2: Vec<usize> = Vec::with_capacity(capacity);`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|