about summary refs log tree commit diff
path: root/src/docs/map_clone.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/docs/map_clone.txt')
-rw-r--r--src/docs/map_clone.txt22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/docs/map_clone.txt b/src/docs/map_clone.txt
deleted file mode 100644
index 3ee27f072ef..00000000000
--- a/src/docs/map_clone.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-### What it does
-Checks for usage of `map(|x| x.clone())` or
-dereferencing closures for `Copy` types, on `Iterator` or `Option`,
-and suggests `cloned()` or `copied()` instead
-
-### Why is this bad?
-Readability, this can be written more concisely
-
-### Example
-```
-let x = vec![42, 43];
-let y = x.iter();
-let z = y.map(|i| *i);
-```
-
-The correct use would be:
-
-```
-let x = vec![42, 43];
-let y = x.iter();
-let z = y.cloned();
-```
\ No newline at end of file