mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 14:38:46 +00:00
Update documentation for clear_with_drain
The specific type `Vec` is replaced with the generic term 'container'
This commit is contained in:
parent
32aa07f832
commit
423b54ac12
1 changed files with 2 additions and 2 deletions
|
@ -3193,7 +3193,7 @@ declare_clippy_lint! {
|
|||
|
||||
declare_clippy_lint! {
|
||||
/// ### What it does
|
||||
/// 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.
|
||||
///
|
||||
/// ### Why is this bad?
|
||||
/// This creates an unnecessary iterator that is dropped immediately.
|
||||
|
@ -3213,7 +3213,7 @@ declare_clippy_lint! {
|
|||
#[clippy::version = "1.69.0"]
|
||||
pub CLEAR_WITH_DRAIN,
|
||||
nursery,
|
||||
"calling `drain` in order to `clear` a `Vec`"
|
||||
"calling `drain` in order to `clear` a container"
|
||||
}
|
||||
|
||||
pub struct Methods {
|
||||
|
|
Loading…
Add table
Reference in a new issue