blob: f89b3a23a1ca2052dc39371427aa3f7634f563f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
### What it does
Checks for arm which matches all errors with `Err(_)`
and take drastic actions like `panic!`.
### Why is this bad?
It is generally a bad practice, similar to
catching all exceptions in java with `catch(Exception)`
### Example
```
let x: Result<i32, &str> = Ok(3);
match x {
Ok(_) => println!("ok"),
Err(_) => panic!("err"),
}
```
|