2023-08-21 11:50:53 -05:00
|
|
|
error: calls to `reverse` immediately after creation
|
2023-08-21 16:36:15 -05:00
|
|
|
--> $DIR/reserve_after_initialization.rs:5:5
|
2023-08-21 11:50:53 -05:00
|
|
|
|
|
2023-08-21 16:36:15 -05:00
|
|
|
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);`
|
2023-08-21 11:50:53 -05:00
|
|
|
|
|
|
|
|
= note: `-D clippy::reserve-after-initialization` implied by `-D warnings`
|
|
|
|
|
2023-08-21 16:36:15 -05:00
|
|
|
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
|
2023-08-21 11:50:53 -05:00
|
|
|
|