mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 09:27:25 +00:00
Remove unnecessary from example
This commit is contained in:
parent
c4909746ad
commit
79eb06c6ec
1 changed files with 5 additions and 2 deletions
|
@ -3133,8 +3133,11 @@ declare_clippy_lint! {
|
|||
/// ### Example
|
||||
/// ```rust
|
||||
/// # let iterator = vec![1].into_iter();
|
||||
/// let len = iterator.clone().collect::<Vec<_>>().len();
|
||||
/// // should be
|
||||
/// let len = iterator.collect::<Vec<_>>().len();
|
||||
/// ```
|
||||
/// Use instead:
|
||||
/// ```rust
|
||||
/// # let iterator = vec![1].into_iter();
|
||||
/// let len = iterator.count();
|
||||
/// ```
|
||||
#[clippy::version = "1.30.0"]
|
||||
|
|
Loading…
Reference in a new issue