Skip to content

Enable (and pass) panic-checking lints in stackslib #6156

Open
@kantai

Description

@kantai

We should be using clippy lints in stackslib -- many lints are purely stylistic, but we should start by prioritizing lints which avoid panics: while the stackslib crate guards panics and unwraps with checks, clippy lints highlight places in the codebase where the rust type system itself could ensure that the checks are performed correctly.

The lints that I think are worth starting with:

  1. clippy::indexing_slicing
  2. clippy::expect_used
  3. clippy::unwrap_used

These won't be small! I think its also worth remembering that sometimes these patterns should be allowed either for performance, or because in some cases, panics really are more appropriate than attempting to soldier on. However, in these cases, we should force the code to explicitly "allow" the usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Status: 🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions