Module reorganization and clippy cleanup

Move single-consumer modules into node/:
- rate_limit.rs, wire.rs, dns.rs — exclusively used by node subsystem
- Reduces top-level lib.rs from 16 to 13 modules

Split large files into focused subdirectories:
- noise.rs (1475 lines) → noise/{mod, handshake, session, replay, tests}.rs
- tree.rs (1479 lines) → tree/{mod, coordinate, declaration, state, tests}.rs
- bloom.rs (849 lines) → bloom/{mod, filter, state, tests}.rs
- All public APIs re-exported from mod.rs, no external import changes

Remove unused rate_limit defaults:
- HANDSHAKE_TIMEOUT_SECS, MAX_PENDING_INBOUND constants
- Default constructor eliminated in favor of with_params() taking config values

Fix all clippy warnings across codebase:
- Remove .clone() on Copy types, collapse nested ifs, replace match-return-None
  with ?, remove/gate unused code, fix loop indexing, remove unnecessary casts
- Box large PeerSlot enum variants to reduce size disparity
- cargo clippy --all-targets now reports zero warnings
This commit is contained in:
Johnathan Corgan
2026-02-15 15:07:42 +00:00
parent 89bc9cc4b0
commit b8a1f322c2
43 changed files with 3997 additions and 3981 deletions
+2 -2
View File
@@ -639,13 +639,13 @@ async fn test_session_100_nodes() {
let fwd_payload = format!("fwd-{}", pair_idx).into_bytes();
let rev_payload = format!("rev-{}", pair_idx).into_bytes();
if delivered_per_node[dst].iter().any(|p| *p == fwd_payload) {
if delivered_per_node[dst].contains(&fwd_payload) {
fwd_delivered += 1;
} else if fwd_missing.len() < 20 {
fwd_missing.push((src, dst));
}
if delivered_per_node[src].iter().any(|p| *p == rev_payload) {
if delivered_per_node[src].contains(&rev_payload) {
rev_delivered += 1;
} else if rev_missing.len() < 20 {
rev_missing.push((src, dst));