chore(clippy): drop expect_used quarantine for lading_throttle#1883
Draft
goxberry wants to merge 1 commit into
Draft
chore(clippy): drop expect_used quarantine for lading_throttle#1883goxberry wants to merge 1 commit into
goxberry wants to merge 1 commit into
Conversation
All 28 `.expect()` sites in `lading_throttle` live under either `#[cfg(test)]` or `#[cfg(kani)]`. The `#[cfg(test)]` sites are exempted by clippy's `allow-expect-in-tests`; the `#[cfg(kani)]` sites are not compiled by `cargo clippy` so the lint never sees them. The crate-root `#![allow(clippy::expect_used)]` is therefore unnecessary and is removed, putting `lading_throttle` fully under the workspace-level `clippy::expect_used = "deny"`. This is the first per-crate cleanup in the stack that began with "chore(clippy): forbid .expect() in production code". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
Removes the transitional
#![allow(clippy::expect_used)]quarantine fromlading_throttle/src/lib.rs. The crate is now fully governed by the workspace-levelclippy::expect_used = "deny"introduced in the parent PR.No code other than the lint-config line is touched.
Motivation
All 28
.expect()sites inlading_throttleare already in code paths that the lint does not (and should not) reach:lading_throttle/src/lib.rs— inside#[cfg(test)] mod testsallow-expect-in-tests = trueinclippy.toml.lading_throttle/src/linear.rs— inside#[cfg(kani)] mod verificationcargo clippydoes not compilecfg(kani)blocks; the kani harness runs undercargo kani, which does not run clippy.lading_throttle/src/stable.rs— inside#[cfg(kani)] mod verificationThat is, the quarantine was already redundant the moment the parent PR's
allow-expect-in-testsexemption was in place. Removing it returns this crate to "fully enforced" with no behavior change — and proves the workspace gate is wired correctly.This is the first per-crate cleanup in the stack started by #1882 (parent). The remaining crates have real production
.expect()sites that require code changes; this one was cost-free.Related issues
Stacked on top of #1882.
Additional Notes
ci/validatepasses locally end-to-end, including kani proofs forlading_throttle.