Skip to content

chore(rust): deny clippy::all and warnings workspace-wide#7

Merged
tupe12334 merged 2 commits into
mainfrom
chore/clippy-deny-all
Jun 2, 2026
Merged

chore(rust): deny clippy::all and warnings workspace-wide#7
tupe12334 merged 2 commits into
mainfrom
chore/clippy-deny-all

Conversation

@tupe12334
Copy link
Copy Markdown
Owner

Summary

  • Add [workspace.lints.rust] warnings = "deny" and [workspace.lints.clippy] all = "deny" to root Cargo.toml
  • Opt both crates in via [lints] workspace = true
  • Fix all pre-existing clippy violations to make the build clean at deny level

Fixes

Lint File Fix
uninit_vec wasm.rs Remove set_len after with_capacity — capacity already allocates; caller writes before reading
missing_const_for_thread_local wasm.rs, lib.rs Use const { RefCell::new(...) } initializer syntax
missing_safety_doc wasm.rs Add # Safety sections to all four pub unsafe extern "C" fns
clone_on_copy wasm.rs, lib.rs Drop redundant .clone() on Copy CallerKind
derivable_impls type_impls.rs Allow with comment — CallerKind is typify-generated; Unknown is not the first variant so #[default] can't be added without patching codegen

Test plan

  • cargo clippy --all-targets --all-features → no warnings, no errors
  • All 154 Rust tests pass (pre-push hook)
  • Full cross-language coverage suite passes

🤖 Generated with Claude Code

tupe12334 and others added 2 commits June 2, 2026 22:51
Fix all pre-existing clippy violations so the deny level compiles clean:
- Remove uninitialised Vec (uninit_vec) in wasm::alloc
- Use const-init thread_local syntax (missing_const_for_thread_local)
- Add # Safety docs to all pub unsafe extern "C" fns (missing_safety_doc)
- Drop redundant .clone() on Copy CallerKind (clone_on_copy)
- Allow derivable_impls on hand-written Default for generated CallerKind

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tupe12334 tupe12334 merged commit 7bf340b into main Jun 2, 2026
7 checks passed
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