Example for VEC_RESIZE_TO_ZERO

This commit is contained in:
alexey semenyuk 2022-06-22 11:01:52 +00:00 committed by GitHub
parent f9fea1737e
commit b969326874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,11 @@ declare_clippy_lint! {
/// ```rust
/// vec!(1, 2, 3, 4, 5).resize(0, 5)
/// ```
///
/// Use instead:
/// ```rust
/// vec!(1, 2, 3, 4, 5).clear()
/// ```
#[clippy::version = "1.46.0"]
pub VEC_RESIZE_TO_ZERO,
correctness,