🎨 reduce nesting in config read function #1006
Annotations
1 warning
Run clechasseur/rs-clippy-check@v3:
src/modules/config.rs#L57
warning: this could be rewritten as `let...else`
--> src/modules/config.rs:57:3
|
57 | let file = if let Ok(f) = file { f } else { return config };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider writing: `let Ok(file) = file else { return config };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
note: the lint level is defined here
--> src/main.rs:2:9
|
2 | #![warn(clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[warn(clippy::manual_let_else)]` implied by `#[warn(clippy::pedantic)]`
|
Loading