Skip to content

fix(raft): fix all clippy warnings#128

Merged
slow2342 merged 1 commit into
mainfrom
fix/clippy-warnings
Jun 14, 2026
Merged

fix(raft): fix all clippy warnings#128
slow2342 merged 1 commit into
mainfrom
fix/clippy-warnings

Conversation

@slow2342

Copy link
Copy Markdown
Owner

Summary

  • Remove unused import ConfChangeType in node.rs
  • Fix unused variables (bootstrapped, messages, context)
  • Replace Default::default() + field assignment with struct initializer
  • Use !is_empty() instead of len() >= 1
  • Remove useless vec! where array suffices

Changes

  • src/raft/node.rs — Remove unused import, fix unused mut and variables
  • src/raft/raftrs_store.rs — Use struct initializers, fix useless conversions
  • src/cluster/discovery.rs — Use array instead of vec! for test data

How to verify

cargo clippy --all-targets -- -D warnings
cargo test --all-targets
cargo fmt -- --check

Remove unused imports, fix unused variables, replace Default::default()
field assignment with struct initializer, and use idiomatic patterns
for length checks and vec! usage.
@slow2342 slow2342 merged commit c10be4e into main Jun 14, 2026
9 of 10 checks passed
@slow2342 slow2342 deleted the fix/clippy-warnings branch June 14, 2026 11:48
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