From df2b25198cee35b30dc19fb162582692b4e507c5 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Thu, 30 Jul 2026 23:11:19 +0000 Subject: [PATCH] Describe what the connected-UDP modules are instead of forecasting their wiring Master-line half of the same correction made on the maintenance line. The header comments on the connected-socket module inside the UDP io layer and on the per-peer drain thread both said the fast path was not yet wired into the encrypt-worker dispatch site, and that a follow-up would do it. It has been wired at both ends for some time: the rx loop calls activate_connected_udp_sessions, which spawns PeerRecvDrain. A reader deciding whether the connected-UDP send path is live got the wrong answer from the first comment they met. Both modules already document themselves, so the forecast comments are deleted rather than reworded, and the dead_code allowances they justified go with them. The bare allowance on the connected-socket handle, which carried no comment at all, goes too. None of the three was suppressing anything: clippy with -D warnings passes with all of them removed, so besides being unjustified they would have hidden whatever went dead next in those modules. The item-level allowance on local_addr is a different attribute and is left alone. --- src/peer/connected_udp/drain.rs | 5 ----- src/peer/connected_udp/socket.rs | 1 - src/transport/udp/io.rs | 5 ----- 3 files changed, 11 deletions(-) diff --git a/src/peer/connected_udp/drain.rs b/src/peer/connected_udp/drain.rs index af83c94..46e06a5 100644 --- a/src/peer/connected_udp/drain.rs +++ b/src/peer/connected_udp/drain.rs @@ -1,8 +1,3 @@ -// Paired with the connected-socket opener (`io::open_connected_fd`): -// dormant in this PR until the activation handler is wired into the -// node tick (follow-up). -#![allow(dead_code)] - //! Recv-side drain thread for a per-peer connected UDP socket. //! //! Once a UDP socket is `connect()`-ed to a peer, Linux and Darwin diff --git a/src/peer/connected_udp/socket.rs b/src/peer/connected_udp/socket.rs index 8b54e54..0404e59 100644 --- a/src/peer/connected_udp/socket.rs +++ b/src/peer/connected_udp/socket.rs @@ -3,7 +3,6 @@ //! Adopts an fd produced by `crate::transport::udp::open_connected_fd` //! and closes it on drop. See that function's docs for why established //! peers get their own connected socket. -#![allow(dead_code)] use std::net::SocketAddr; use std::os::unix::io::{AsRawFd, OwnedFd, RawFd}; diff --git a/src/transport/udp/io.rs b/src/transport/udp/io.rs index 8ef74fc..6a2842a 100644 --- a/src/transport/udp/io.rs +++ b/src/transport/udp/io.rs @@ -803,11 +803,6 @@ pub use platform::{AsyncUdpSocket, UdpRawSocket}; /// is libc-syscall + `sockopts_macos` specific. #[cfg(any(target_os = "linux", target_os = "macos"))] mod connected { - // The connected-UDP fast path is infra-ready but not yet wired into - // the encrypt-worker dispatch site (a follow-up PR will refcount-clone - // the socket into each FmpSendJob). Keep the API surface in tree. - #![allow(dead_code)] - use std::io; use std::net::SocketAddr; use std::os::unix::io::{AsRawFd, FromRawFd, OwnedFd, RawFd};