Skip to content

chore: scope a test-only import to cfg(test), v0.19.1 - #34

Merged
cycle-five merged 1 commit into
masterfrom
chore/lint-and-deps
Aug 22, 2026
Merged

cycle-five merged 1 commit into
masterfrom
chore/lint-and-deps

Conversation

@cycle-five

Copy link
Copy Markdown
Owner

Clears the one clippy warning in this crate. No API change, no wire-format impact.

Root cause

NewsNotificationType was imported at module scope in server_messages.rs, but all three uses are inside mod tests. The lib target compiles without cfg(test), so it reported the import as unused.

Why not cargo clippy --fix

The automatic suggestion is to delete the import. That compiles the lib clean and then breaks the test build — the three uses are real, just test-scoped. Moved the import into the test module instead.

Note on dependencies

Cargo.lock is gitignored here (library crate), so the cargo update in this sweep has no committed effect and reaches consumers via their own lockfiles. The backend's refreshed lock is in its own PR.

Verification

check result
cargo clippy --all-targets --all-features 0 diagnostics
cargo +nightly fmt --check clean
cargo test 92 passed

Part of a four-repo housekeeping sweep before the database schema-review arc.

🤖 Generated with Claude Code

https://claude.ai/code/session_013XsxPPjZirw6F1XjGwwjvn

`NewsNotificationType` was imported at module scope in
`server_messages.rs` but every use is inside `mod tests`, so the lib
target (which compiles without `cfg(test)`) reported it as an unused
import. Moved the import into the test module.

Deliberately NOT done via `cargo clippy --fix`: the automatic
suggestion is to delete the import, which compiles the lib clean and
then breaks the test build. The three uses are real, just test-scoped.

No API change, so no wire-format impact — `Cargo.lock` is gitignored
here (library crate), so the dependency refresh in this pass has no
committed effect and lands via consumers' own lockfiles.

clippy `--all-targets --all-features` is now zero diagnostics, fmt is
clean, and all 92 tests pass.

Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
@cycle-five
cycle-five merged commit 3489530 into master Aug 22, 2026
1 check passed
@cycle-five
cycle-five deleted the chore/lint-and-deps branch August 22, 2026 16:47
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