Commit cf74c74
committed
lint: enable clippy restriction lints, disable redundant dylint rule
Enable `clippy::clone_on_ref_ptr`, `clippy::if_then_some_else_none`, and
`clippy::unnecessary_lazy_evaluations` as warnings, which the existing
`cargo clippy -- -D warnings` invocation in `test.sh` promotes to hard
errors in CI. Disable `perfectionist::arc_rc_clone` in `dylint.toml`
because `clippy::clone_on_ref_ptr` now covers the same ground in the
default lint pass.
Apply the single resulting code fix in `App::run`, replacing an
`if`/`else` that produced `Some(1)`/`None` with `.then(|| ...)`.1 parent 8c00d3e commit cf74c74
3 files changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
94 | 99 | | |
95 | 100 | | |
96 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 150 | + | |
| 151 | + | |
154 | 152 | | |
155 | 153 | | |
156 | 154 | | |
| |||
0 commit comments