Commit 376f371
committed
Resolve manual_let_else pedantic clippy lint in dump-syntax
warning: this could be rewritten as `let...else`
--> examples/dump-syntax/src/main.rs:101:5
|
101 | / let code_line = match start.line.checked_sub(1).and_then(|n| code.lines().nth(n)) {
102 | | Some(line) => line,
103 | | None => return render_fallback(formatter, err),
104 | | };
| |______^ help: consider writing: `let Some(code_line) = start.line.checked_sub(1).and_then(|n| code.lines().nth(n)) else { return render_fallback(formatter, err) };`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
= note: `-W clippy::manual-let-else` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_let_else)]`1 parent b4c6c8f commit 376f371
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
103 | | - | |
| 101 | + | |
| 102 | + | |
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
| |||
0 commit comments