We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
clear_with_drain
1 parent 32aa07f commit 423b54aCopy full SHA for 423b54a
clippy_lints/src/methods/mod.rs
@@ -3193,7 +3193,7 @@ declare_clippy_lint! {
3193
3194
declare_clippy_lint! {
3195
/// ### What it does
3196
- /// Checks for usage of `.drain(..)` for the sole purpose of clearing a `Vec`.
+ /// Checks for usage of `.drain(..)` for the sole purpose of clearing a container.
3197
///
3198
/// ### Why is this bad?
3199
/// This creates an unnecessary iterator that is dropped immediately.
@@ -3213,7 +3213,7 @@ declare_clippy_lint! {
3213
#[clippy::version = "1.69.0"]
3214
pub CLEAR_WITH_DRAIN,
3215
nursery,
3216
- "calling `drain` in order to `clear` a `Vec`"
+ "calling `drain` in order to `clear` a container"
3217
}
3218
3219
pub struct Methods {
0 commit comments