Repository navigation
chore: scope a test-only import to cfg(test), v0.19.1 - #34
Merged
Merged
Conversation
`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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clears the one clippy warning in this crate. No API change, no wire-format impact.
Root cause
NewsNotificationTypewas imported at module scope inserver_messages.rs, but all three uses are insidemod tests. The lib target compiles withoutcfg(test), so it reported the import as unused.Why not
cargo clippy --fixThe 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.lockis gitignored here (library crate), so thecargo updatein this sweep has no committed effect and reaches consumers via their own lockfiles. The backend's refreshed lock is in its own PR.Verification
cargo clippy --all-targets --all-featurescargo +nightly fmt --checkcargo testPart of a four-repo housekeeping sweep before the database schema-review arc.
🤖 Generated with Claude Code
https://claude.ai/code/session_013XsxPPjZirw6F1XjGwwjvn