summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/manual_unwrap_or.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/src/docs/manual_unwrap_or.txt')
-rw-r--r--src/tools/clippy/src/docs/manual_unwrap_or.txt20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/tools/clippy/src/docs/manual_unwrap_or.txt b/src/tools/clippy/src/docs/manual_unwrap_or.txt
deleted file mode 100644
index 1fd7d831b..000000000
--- a/src/tools/clippy/src/docs/manual_unwrap_or.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-### What it does
-Finds patterns that reimplement `Option::unwrap_or` or `Result::unwrap_or`.
-
-### Why is this bad?
-Concise code helps focusing on behavior instead of boilerplate.
-
-### Example
-```
-let foo: Option<i32> = None;
-match foo {
- Some(v) => v,
- None => 1,
-};
-```
-
-Use instead:
-```
-let foo: Option<i32> = None;
-foo.unwrap_or(1);
-``` \ No newline at end of file