Closed
Description
example:
warning: use of `expect` followed by a function call
--> src/main.rs:27:45
|
27 | dotenv::var(format!("{}_{}", ex_id, i)).expect(&format!("key {}_{} not found", ex_id, i))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| panic!("key {}_{} not found", ex_id))`
|
= note: #[warn(clippy::expect_fun_call)] on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call
should be panic!("key {}_{} not found", ex_id,i)
, instead of panic!("key {}_{} not found", ex_id)