mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +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
@ -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…
Reference in New Issue
Block a user