From df9063013e94051aac6f20826ed9dd44294d390e Mon Sep 17 00:00:00 2001 From: Jeremy Stucki Date: Sun, 11 Aug 2019 22:18:58 +0200 Subject: [PATCH] Update rustdoc --- clippy_lints/src/methods/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index dc5c579b7..41b92b052 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -351,11 +351,13 @@ declare_clippy_lint! { /// /// **Example:** /// ```rust - /// iter.flat_map(|x| x) + /// # let iter = vec![vec![0]].into_iter(); + /// iter.flat_map(|x| x); /// ``` /// Can be written as /// ```rust - /// iter.flatten() + /// # let iter = vec![vec![0]].into_iter(); + /// iter.flatten(); /// ``` pub FLAT_MAP_IDENTITY, pedantic,