diff options
| author | alexey semenyuk <alexsemenyuk88@gmail.com> | 2022-06-22 11:01:52 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-22 11:01:52 +0000 |
| commit | b969326874ecd1f0a9e52aab629d089f258039b4 (patch) | |
| tree | 3ba96f3c06cebeedbc2b14c0fa2e96c155cc8791 | |
| parent | f9fea1737e34da3afedf4a0d35ea4866ce7f87a1 (diff) | |
| download | rust-b969326874ecd1f0a9e52aab629d089f258039b4.tar.gz rust-b969326874ecd1f0a9e52aab629d089f258039b4.zip | |
Example for VEC_RESIZE_TO_ZERO
| -rw-r--r-- | clippy_lints/src/vec_resize_to_zero.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clippy_lints/src/vec_resize_to_zero.rs b/clippy_lints/src/vec_resize_to_zero.rs index 4d86abd0fa1..0fee3e812d2 100644 --- a/clippy_lints/src/vec_resize_to_zero.rs +++ b/clippy_lints/src/vec_resize_to_zero.rs @@ -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, |
