Skip to content

Commit 9a62dd1

Browse files
nficanoclaude
andcommitted
fix(clippy): use map_or in BudgetTracker::is_disabled to satisfy 1.95 lint
CI stable channel (rustc 1.95) enabled clippy::map_unwrap_or which fires on .map(...).unwrap_or(true). Local MSRV-aligned 1.88/1.92 missed it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3921c45 commit 9a62dd1

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/runtime/context.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ impl BudgetTracker {
7575
/// True when no currencies are tracked (i.e. budgeting is disabled).
7676
#[must_use]
7777
pub fn is_disabled(&self) -> bool {
78-
self.inner
79-
.state
80-
.lock()
81-
.map(|s| s.is_empty())
82-
.unwrap_or(true)
78+
self.inner.state.lock().map_or(true, |s| s.is_empty())
8379
}
8480

8581
/// Remaining budget for `currency`, if tracked. `None` means the

0 commit comments

Comments
 (0)