Skip to content

Commit eb8f505

Browse files
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

File tree

libwebauthn/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#![cfg_attr(not(test), deny(clippy::panic))]
66
#![cfg_attr(not(test), deny(clippy::todo))]
77
#![cfg_attr(not(test), deny(clippy::unreachable))]
8+
#![cfg_attr(not(test), deny(clippy::indexing_slicing))]
9+
#![cfg_attr(not(test), deny(clippy::unwrap_in_result))]
810

911
pub mod fido;
1012
pub mod management;

0 commit comments

Comments
 (0)