summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/manual_find_map.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/src/docs/manual_find_map.txt')
-rw-r--r--src/tools/clippy/src/docs/manual_find_map.txt19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/tools/clippy/src/docs/manual_find_map.txt b/src/tools/clippy/src/docs/manual_find_map.txt
deleted file mode 100644
index 83b22060c..000000000
--- a/src/tools/clippy/src/docs/manual_find_map.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-### What it does
-Checks for usage of `_.find(_).map(_)` that can be written more simply
-as `find_map(_)`.
-
-### Why is this bad?
-Redundant code in the `find` and `map` operations is poor style and
-less performant.
-
-### Example
-```
-(0_i32..10)
- .find(|n| n.checked_add(1).is_some())
- .map(|n| n.checked_add(1).unwrap());
-```
-
-Use instead:
-```
-(0_i32..10).find_map(|n| n.checked_add(1));
-``` \ No newline at end of file