### What it does Checks for functions of type `Result` that contain `expect()` or `unwrap()` ### Why is this bad? These functions promote recoverable errors to non-recoverable errors which may be undesirable in code bases which wish to avoid panics. ### Known problems This can cause false positives in functions that handle both recoverable and non recoverable errors. ### Example Before: ``` fn divisible_by_3(i_str: String) -> Result<(), String> { let i = i_str .parse::() .expect("cannot divide the input by three"); if i % 3 != 0 { Err("Number is not divisible by 3")? } Ok(()) } ``` After: ``` fn divisible_by_3(i_str: String) -> Result<(), String> { let i = i_str .parse::() .map_err(|e| format!("cannot divide the input by three: {}", e))?; if i % 3 != 0 { Err("Number is not divisible by 3")? } Ok(()) } ```