Skip to content

Commit df90630

Browse files
committed
Update rustdoc
1 parent 5fd7d44 commit df90630

File tree

1 file changed

+4
-2
lines changed
  • clippy_lints/src/methods

1 file changed

+4
-2
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,13 @@ declare_clippy_lint! {
351351
///
352352
/// **Example:**
353353
/// ```rust
354-
/// iter.flat_map(|x| x)
354+
/// # let iter = vec![vec![0]].into_iter();
355+
/// iter.flat_map(|x| x);
355356
/// ```
356357
/// Can be written as
357358
/// ```rust
358-
/// iter.flatten()
359+
/// # let iter = vec![vec![0]].into_iter();
360+
/// iter.flatten();
359361
/// ```
360362
pub FLAT_MAP_IDENTITY,
361363
pedantic,

0 commit comments

Comments
 (0)