about summary refs log tree commit diff
path: root/src/docs/expect_used.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/docs/expect_used.txt')
-rw-r--r--src/docs/expect_used.txt26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/docs/expect_used.txt b/src/docs/expect_used.txt
deleted file mode 100644
index 4a6981e334f..00000000000
--- a/src/docs/expect_used.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-### What it does
-Checks for `.expect()` or `.expect_err()` calls on `Result`s and `.expect()` call on `Option`s.
-
-### Why is this bad?
-Usually it is better to handle the `None` or `Err` case.
-Still, for a lot of quick-and-dirty code, `expect` is a good choice, which is why
-this lint is `Allow` by default.
-
-`result.expect()` will let the thread panic on `Err`
-values. Normally, you want to implement more sophisticated error handling,
-and propagate errors upwards with `?` operator.
-
-### Examples
-```
-option.expect("one");
-result.expect("one");
-```
-
-Use instead:
-```
-option?;
-
-// or
-
-result?;
-```
\ No newline at end of file