Skip to content

Commit f69d35b

Browse files
committed
fix(ci): allow clippy::duration_suboptimal_units
Rust 1.95's new `duration_suboptimal_units` lint flags `Duration::from_secs(N)` where N is divisible by 60 / 3600 (~50 sites across retry/timeout code). Functionally identical to `from_mins`/ `from_hours`; the readability gain is marginal and the churn is real. Allow the lint workspace-wide to unblock CI on rust 1.95 stable.
1 parent 1541479 commit f69d35b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ option_if_let_else = "allow"
189189
or_fun_call = "allow"
190190
comparison_chain = "allow"
191191
if_same_then_else = "allow"
192+
# Stylistic-only; `Duration::from_secs(3600)` reads just as well as
193+
# `from_hours(1)`. The lint (rust 1.95+) fires across retry/timeout
194+
# code with no functional benefit.
195+
duration_suboptimal_units = "allow"
192196

193197
[profile.dev]
194198
opt-level = 0

0 commit comments

Comments
 (0)