Repository navigation
chore: fix the clippy lints that fail lint on main - #1666
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M7V9YJNT85W588S71VNAFQP7
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
[Low impact] This PR appears safe to merge. SummaryThis PR fixes Clippy warnings without intended user-facing changes.
The previous finding is fixed. No new actionable issues were found. Reviews (2) · Last reviewed commit: "chore: correct the block_on comment afte..." · Reviewed by Greptile |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M7VA8FFK080P57VRQF3C4ACA
Instruction counts
No instruction-count regression above 1%. Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes. Shadow comparisonParsing
|
### 🐛 Bug Fixes - **(fish)** keep backslashes in run= commands of embedded completion specs by [@jdx](https://github.com/jdx) in [#1659](#1659) - **(powershell)** offer subcommands instead of files after a trailing space by [@jdx](https://github.com/jdx) in [#1672](#1672) - **(spec)** emit valid kdl choices from cobra by [@jdx](https://github.com/jdx) in [#1670](#1670) ### 🛡️ Security - **(deps)** update mise tools by [@renovate[bot]](https://github.com/renovate[bot]) in [#1663](#1663) ### 🔍 Other Changes - **(entire)** remove trail runners by [@jdx](https://github.com/jdx) in [a5dc9df](a5dc9df) - fix the clippy lints that fail lint on main by [@jdx](https://github.com/jdx) in [#1666](#1666) ### 📦️ Dependency Updates - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#1665](#1665) - update dependency effect to v4.1.4 by [@renovate[bot]](https://github.com/renovate[bot]) in [#1661](#1661) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#1667](#1667) - update module github.com/spf13/pflag to v1.1.0 by [@renovate[bot]](https://github.com/renovate[bot]) in [#1664](#1664) - update github actions by [@renovate[bot]](https://github.com/renovate[bot]) in [#1662](#1662) - update jdx/mise-action action to v5.2.8 by [@renovate[bot]](https://github.com/renovate[bot]) in [#1668](#1668)
mise run lint(cargo clippy --all --all-features --all-targets -- -D warnings) fails onmainand on every branch cut from it since a newer clippy started reporting four lints. This is what turned the Renovate PRs red (for example #1664, whose own change was fine). No behaviour changes.clippy::new_instead_of_clearinlib/src/docs/layout.rs:current_line = String::new()becomescurrent_line.clear(), which keeps the allocation.clippy::unnecessary_box_pininconformance/tests/dispatch_async.rs,dispatch_async_stack.rsandusage-rs-tests/tests/facade.rs:Box::pin(future)becomesstd::pin::pin!(future).clippy::duplicated_attributesin the generated shadow crates: the generator spells a flag's aliases as repeatedlong = .../short = ...entries (for example#[usage(long = "tail", long = "follow", short = 't', short = 'f')]in the pitchfork shadow), which the lint flags. That repetition is how aliases are written, so the generator now emitsclippy::duplicated_attributesin each shadow's crate-level#![allow(...)], and the twelve generatedlib.rsfiles carry the one-line change.Validation: the CI clippy command passes locally, as do
cargo test -p xtask -p usage-lib -p usage-conformance --all-features(1679 tests) and the facade tests inusage-rs-workspace-tests. The same two lints inlayout.rsand the pitchfork shadow fail onorigin/maintoo, confirmed with a baseline run.🤖 Generated with Claude Code
AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: unavailable.
Note
Low Risk
Lint-only and test-helper tweaks with no production behavior or security impact.
Overview
Restores a clean
cargo clippyrun onmainby addressing three lints—no runtime behavior changes.In docs layout word-wrapping, line buffers are reset with
current_line.clear()instead ofString::new()so the existing allocation is reused (clippy::new_instead_of_clear).Test helpers in async dispatch and facade tests pin futures with
std::pin::pin!(future)rather thanBox::pin, and the stack-dispatch test comment is updated to match (clippy::unnecessary_box_pin).Shadow benchmark crates legitimately repeat
long/shortattributes for CLI aliases;xtask’sgen-shadowoutput now includesclippy::duplicated_attributesin the crate-level#![allow(...)], and all regenerated shadowlib.rsfiles pick up that one-line change.Reviewed by Cursor Bugbot for commit d95fd7f. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit