Remove unnecessary from example

This commit is contained in:
Mick van Gelderen 2023-05-15 22:24:37 +02:00
parent c4909746ad
commit 79eb06c6ec
No known key found for this signature in database
GPG key ID: 6BD3FEFAFF7626D1

View file

@ -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"]