From 0505dacf67e15eff5c3d975bedba2f50d24834f7 Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Fri, 22 May 2026 03:18:02 +0000 Subject: [PATCH] chore(clippy): drop expect_used quarantine for lading_throttle 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) --- CHANGELOG.md | 4 ++++ lading_throttle/src/lib.rs | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 155d0ff87..e4029c18b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased +- Removed the transitional `#![allow(clippy::expect_used)]` quarantine from + `lading_throttle`. All `.expect()` sites in that crate are under + `#[cfg(test)]` or `#[cfg(kani)]`, so the workspace-level + `clippy::expect_used = "deny"` now applies without local overrides. - Added `clippy::expect_used = "deny"` to the workspace-level lint set, mirroring the existing `clippy::unwrap_used` policy, and set `allow-expect-in-tests = true` in `clippy.toml`. Production `.expect()` diff --git a/lading_throttle/src/lib.rs b/lading_throttle/src/lib.rs index c1e22c340..493a0907e 100644 --- a/lading_throttle/src/lib.rs +++ b/lading_throttle/src/lib.rs @@ -6,9 +6,6 @@ #![deny(clippy::cargo)] #![allow(clippy::cast_precision_loss)] #![allow(clippy::multiple_crate_versions)] -// Quarantine: workspace denies `clippy::expect_used`, but this crate still has -// production `.expect()` sites awaiting cleanup. Remove once cleaned up. -#![allow(clippy::expect_used)] use async_trait::async_trait; use serde::{Deserialize, Serialize};