You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eleven functions in `lading_payload` contain `.expect()` calls that are
the function's documented contract: violating the precondition is a
programming error, and panicking is the intended response. Each such
function gets `#[expect(clippy::expect_used, reason = "...")]` so the
workspace-level lint is bypassed at the source with an explicit reason.
Covered functions and the invariant each preserves:
- `block::Cache::read_at` — documents in its doc comment that it panics
if reads exceed machine-word bytes; the `usize::try_from(u64)` calls
inside are the documented contract.
- `RandomStringPool::using_handle` and `StringListPool::using_handle` —
the `Handle` enum has two variants, one per pool; a handle of the
wrong variant is a programming error (cross-pool misuse).
- `Display::fmt` impls for `Event` (in `dogstatsd/event.rs`),
`ServiceCheck` (in `dogstatsd/service_check.rs`), and `Count`, `Gauge`,
`Timer`, `Dist`, `Set`, `Histogram` (all in `dogstatsd/metric.rs`) —
each formats tag keys/values by handle-table lookup against
`self.pools`, which issued those handles at construction time; a miss
indicates an internal invariant violation.
The `.expect()` calls themselves are unchanged. No runtime behavior
change. Same stack as #1882–#1890.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments