Skip to content

Commit 423b54a

Browse files
committed
Update documentation for clear_with_drain
The specific type `Vec` is replaced with the generic term 'container'
1 parent 32aa07f commit 423b54a

File tree

1 file changed

+2
-2
lines changed
  • clippy_lints/src/methods

1 file changed

+2
-2
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3193,7 +3193,7 @@ declare_clippy_lint! {
31933193

31943194
declare_clippy_lint! {
31953195
/// ### What it does
3196-
/// Checks for usage of `.drain(..)` for the sole purpose of clearing a `Vec`.
3196+
/// Checks for usage of `.drain(..)` for the sole purpose of clearing a container.
31973197
///
31983198
/// ### Why is this bad?
31993199
/// This creates an unnecessary iterator that is dropped immediately.
@@ -3213,7 +3213,7 @@ declare_clippy_lint! {
32133213
#[clippy::version = "1.69.0"]
32143214
pub CLEAR_WITH_DRAIN,
32153215
nursery,
3216-
"calling `drain` in order to `clear` a `Vec`"
3216+
"calling `drain` in order to `clear` a container"
32173217
}
32183218

32193219
pub struct Methods {

0 commit comments

Comments
 (0)