Commit eb8f505
committed
chore(clippy): enable indexing_slicing and unwrap_in_result lints
`clippy::indexing_slicing` flags any `&v[i]` / `&v[a..b]` that could
panic at runtime, complementing the existing `deny(clippy::panic)`
which does not see slice-index panics from transitive crates.
`clippy::unwrap_in_result` flags `.unwrap()` / `.expect()` inside
functions that return `Result`, where bubbling the error is almost
always preferable.
Enable both for non-test code; tests retain the latitude they already
have via the existing cfg_attr pattern.
This commit is intentionally lint-failing: subsequent commits in this
PR fix the call sites that the new lints surface.1 parent 6a8e588 commit eb8f505
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
0 commit comments