summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/unnecessary_fold.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/src/docs/unnecessary_fold.txt')
-rw-r--r--src/tools/clippy/src/docs/unnecessary_fold.txt17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/tools/clippy/src/docs/unnecessary_fold.txt b/src/tools/clippy/src/docs/unnecessary_fold.txt
deleted file mode 100644
index e1b0e65f5..000000000
--- a/src/tools/clippy/src/docs/unnecessary_fold.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-### What it does
-Checks for using `fold` when a more succinct alternative exists.
-Specifically, this checks for `fold`s which could be replaced by `any`, `all`,
-`sum` or `product`.
-
-### Why is this bad?
-Readability.
-
-### Example
-```
-(0..3).fold(false, |acc, x| acc || x > 2);
-```
-
-Use instead:
-```
-(0..3).any(|x| x > 2);
-``` \ No newline at end of file