Skip to content

Commit

Permalink
Fix doc test
Browse files Browse the repository at this point in the history
  • Loading branch information
ldm0 committed Mar 2, 2022
1 parent 5c8e4de commit 7599526
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1128,11 +1128,13 @@ declare_clippy_lint! {
///
/// ### Example
/// ```rust
/// # use std::collections::HashSet;
/// let mut foo = vec![0, 1, 2, 3];
/// let bar: HashSet<usize> = foo.drain(..).collect();
/// ```
/// Use instead:
/// ```rust
/// # use std::collections::HashSet;
/// let foo = vec![0, 1, 2, 3];
/// let bar: HashSet<usize> = foo.into_iter().collect();
/// ```
Expand Down

0 comments on commit 7599526

Please sign in to comment.