mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
c2c73189c8
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
14 lines
446 B
Text
14 lines
446 B
Text
error: emptying a vector with `resize`
|
|
--> $DIR/vec_resize_to_zero.rs:7:5
|
|
|
|
|
LL | v.resize(0, 5);
|
|
| ^^------------
|
|
| |
|
|
| help: ...or you can empty the vector with: `clear()`
|
|
|
|
|
= help: the arguments may be inverted...
|
|
= note: `-D clippy::vec-resize-to-zero` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::vec_resize_to_zero)]`
|
|
|
|
error: aborting due to 1 previous error
|
|
|