jouleclaw-backend-apple: 84 clippy warnings -> 0, and -D warnings now covers both configurations #437
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/backend-apple-lints"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This closes the per-configuration lint hole #373 opened and #414 halved. The
-D warningsstep now lintsjouleclaw-loader-ggufunderrayon fabric-meteras well as on default, plusjouleclaw-backend-appleon its own.Two things I had wrong in #414, both settled by measuring
#414's comment in
standards-build.ymlsaid the fabric-meter configuration could not be gated because backend-apple's warnings "are unused in THAT configuration and needed in others, so they want cfg work rather than deletion."[features]at all — only a macOS-conditional dependency block. There is one configuration, so the unused items are unconditionally unused.mps_matmul.rs.How it came down
manual_is_multiple_of23,unnecessary_cast8,needless_option_as_deref3, …)unused_unsafe+ 15unused_importsThe middle group is the interesting one: neither
clippy --fixnorcargo fixwill touch them, with or without--all-targets. They carry no machine-applicable suggestion (suggested_replacementisNone). They are plain code rather than macro expansions, so they were fixed from rustc's own line numbers:|| unsafe { .. }→|| { .. }where objc2 0.6 made the call safe. Dropping a block rustc has already proved redundant cannot change behaviour.use objc2_metal::{MTLComputePipelineState as _, MTLLibrary as _}→ just the name the function needs. The unused one is a trait brought in as_; the type is referenced fully qualified two lines above, which is why it reads as used at a glance.Checked before deleting, because this is exactly the shape that broke #372: each unused import was matched against every other mention of its name in the file and against the file's six
cfg(not(target_os = "macos"))branches. None appears in one — andobjc2-metalis a macOS-only dependency, so no other configuration could want them.The last ten
struct PipelineCellwith itsunsafe impl Send/Syncwas never constructed and mentioned nowhere else — scaffolding for aOnceLockwrapper the pipelines ended up doing directly. Removed, and the space reused for aKeepAlivetype alias, which is what bothtype_complexitywarnings wanted: the inline form is three generic layers deep and appeared twice.DeviceKvCachehad a publiclenand nois_empty.let qk_pipe = qk_pipe;no-op rebindings left from a refactor.too_many_argumentsandneedless_range_loopallowed crate-wide — the same two decisions omni and loader-gguf already record, for the same reasons.Verified
All ten lint specs in the step pass, 37 backend-apple tests (32 pass, 5 ignored), 343 loader-gguf tests, 77 omni tests.
🤖 Generated with Claude Code