Skip to content

fix: resolve clippy warnings#172

Open
seriouscoderone wants to merge 3 commits intoWebOfTrust:mainfrom
seriouscoderone:fix/clippy-warnings
Open

fix: resolve clippy warnings#172
seriouscoderone wants to merge 3 commits intoWebOfTrust:mainfrom
seriouscoderone:fix/clippy-warnings

Conversation

@seriouscoderone
Copy link

Summary

Resolve all clippy warnings to enable strict cargo clippy -- -D warnings in CI.

Note: This PR depends on #171 being merged first (it builds on that branch).

Changes

File Fix
src/core/indexer/tables.rs Remove empty line after doc comment
src/core/indexer/mod.rs Use if let instead of is_some() + unwrap()
src/core/indexer/mod.rs Use .is_multiple_of(3) instead of % 3 != 0
src/core/indexer/mod.rs Use .div_ceil(4) instead of (n + 3) / 4
src/core/matter/mod.rs Use .is_multiple_of(3) and .div_ceil(4)
src/core/pather.rs Remove unneeded return statement
src/core/tholder.rs Use if let Ok(value) instead of is_ok() + unwrap()
.github/workflows/test.yml Re-enable strict clippy (-D warnings)

Test plan

  • cargo clippy -- -D warnings passes
  • cargo test passes (832 tests)
  • cargo fmt --check passes

🤖 Generated with Claude Code

seriouscoderone and others added 3 commits February 3, 2026 07:52
The `dat!` macro is already available crate-wide via `#[macro_use]`
on the data module in lib.rs. These explicit imports are redundant
and cause compilation failures with `#![deny(warnings)]`.

Removes unused imports from:
- src/core/common.rs (module and test)
- src/core/creder.rs
- src/core/pather.rs (test)
- src/core/prefixer.rs (test)
- src/core/sadder.rs (test)
- src/core/saider.rs (module and test)
- src/core/serder.rs
- src/core/tholder.rs
- src/data.rs (test)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace deprecated actions-rs/toolchain with dtolnay/rust-toolchain
- Update actions/checkout to v4
- Add cargo caching for faster builds
- Split into parallel jobs (check, audit, wasm)
- Remove cargo-outdated (too strict for contributions)
- Remove tarpaulin (can be added later with proper setup)
- Install cargo-audit before running audit

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove empty line after doc comment in indexer/tables.rs
- Use `if let` instead of `is_some()`/`is_ok()` + `unwrap()` pattern
- Replace manual `% 3 != 0` with `.is_multiple_of(3)`
- Replace manual `(n + 3) / 4` with `.div_ceil(4)`
- Remove unneeded `return` statement in pather.rs

These fixes allow `cargo clippy -- -D warnings` to pass,
enabling strict clippy checks in CI.

Co-Authored-By: Claude Opus 4.5 <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