Skip to content

fix: clear clippy's findings under -D warnings - #240

Open
robfischer1 wants to merge 1 commit into
arcjet:mainfrom
robfischer1:clippy-findings
Open

robfischer1 wants to merge 1 commit into
arcjet:mainfrom
robfischer1:clippy-findings

Conversation

@robfischer1

Copy link
Copy Markdown

The findings were:

  • Three useless .into() calls.
  • Three redundant & in format!.
  • too_many_arguments inside wit-bindgen's expansion in the records example.

The last one is fixed by setting the records example's clippy.toml threshold to 16, the canonical ABI's flat-parameter limit, instead of suppressing the lint. The PR also removes two stale #[allow(dead_code)].

No generated output changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01K99bnsYaj3w4MMWSF5hTMu

`cargo clippy --workspace --all-targets -- -W clippy::all -D warnings`
(Rust 1.97) fails on main with:

- three useless `.into()` conversions of a String in func.rs and three
  redundant `&` in format! arguments (func.rs, imports.rs);
- clippy::too_many_arguments inside wit-bindgen's generate! expansion in
  the records example: the export glue for modify-foo takes one argument
  per flattened field of foo, ten. examples/records/clippy.toml raises
  the threshold to 16, the canonical ABI's flat-parameter limit, rather
  than suppressing the lint.

It also drops two `#[allow(dead_code)]` on Direction::Export and
Func::export, both of which ExportGenerator uses, so they suppressed
nothing. No generated output changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robfischer1
robfischer1 requested a review from a team as a code owner October 7, 2026 14:26
@arcjet-review arcjet-review Bot added the needs review Awaiting human review label Oct 7, 2026

@arcjet-rei arcjet-rei left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's kind of embarrassing that clippy wasn't already part of our CI flow (we'll be adding it shortly after this lands). Thanks for putting this together.

As noted on #233, commits onto this repo must be signed, so once that's taken care of, I'll get this in.

@arcjet-review arcjet-review Bot removed the needs review Awaiting human review label Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants