Skip to content

chore(clippy): apply pedantic auto-fixes (inline format args + method refs)#134

Merged
runonthespot merged 1 commit into
mainfrom
chore/clippy-cleanup
May 24, 2026
Merged

chore(clippy): apply pedantic auto-fixes (inline format args + method refs)#134
runonthespot merged 1 commit into
mainfrom
chore/clippy-cleanup

Conversation

@runonthespot
Copy link
Copy Markdown
Contributor

Summary

Mechanical `cargo clippy --fix` cleanup with three pedantic lints, opt-in just for this pass:

  • `clippy::uninlined_format_args` — `format!("{}", x)` → `format!("{x}")`
  • `clippy::redundant_closure_for_method_calls` — `.map(|x| x.to_string())` → `.map(ToString::to_string)`
  • `clippy::needless_raw_string_hashes` — drop `#` when the raw string doesn't need them

27 files touched, all single-line substitutions. No logic changes, no behavior changes.

Why now

Reduces incidental fmt drift on future PRs (most files would otherwise gain one or two inlined-format-arg changes whenever someone touches them). One-time cleanup so the diff is concentrated rather than scattered.

What I did NOT do

  • Did NOT add `#![warn(clippy::pedantic)]` to any crate. The default warn level remains the CI gate. If we wanted pedantic-strict permanently, that's a separate discussion (it has ~150 other warnings — some are good, many are noise).
  • Did NOT touch any code with actual logic.

Verified

  • `cargo check --workspace` clean
  • `cargo fmt --all --check` clean
  • `cargo clippy --workspace --all-features --all-targets -- -D warnings` clean (existing CI gate)
  • ck-engine tests pass

🤖 Generated with Claude Code

… refs)

Mechanical \`cargo clippy --fix\` cleanup with three pedantic lints:
- \`clippy::uninlined_format_args\` — \`format!(\"{}\", x)\` → \`format!(\"{x}\")\`
- \`clippy::redundant_closure_for_method_calls\` — \`.map(|x| x.to_string())\` → \`.map(ToString::to_string)\`
- \`clippy::needless_raw_string_hashes\` — drop \`#\` when not needed

27 files touched, all single-line substitutions. No logic changes,
no behavior changes. Verified:
- \`cargo check --workspace\` clean
- \`cargo fmt --all --check\` clean
- \`cargo clippy --workspace --all-features --all-targets -- -D warnings\` clean (existing CI standard)
- ck-engine tests pass (\`--no-default-features\` to skip local ort link issue)

No \`#![warn(clippy::pedantic)]\` added — we keep the default warn
level as the CI gate. This is one-time noise reduction so future
file-level edits don't get incidental fmt drift.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@runonthespot runonthespot merged commit 24ac895 into main May 24, 2026
14 checks passed
@runonthespot runonthespot deleted the chore/clippy-cleanup branch May 24, 2026 15:56
runonthespot added a commit that referenced this pull request May 24, 2026
Ships #133 (security: 11 CodeQL alerts + 4 npm transitives closed) and
#134 (clippy pedantic auto-fix cleanup across 27 files).

After this release: open security alerts = 0 across both Dependabot
and CodeQL surfaces.

Cutting partly so the in-flight community PRs (#102 C/C++ support, #104
markdown support) have a clean current base to rebase on.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant