mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-09 08:14:42 +00:00
Say why the Darwin socket tuning module allows dead code
Its header said the tuning was dormant, and that the module was kept visible on Linux so clippy would not lose track of it. Both claims are false: apply_udp_socket_tuning is called from the connected-peer socket opener under cfg(macos), and the module declaration is itself gated to macOS, so it is not compiled on Linux at all. Unlike the two sibling modules, this allowance stays, because here it is doing real work: the module defines the whole NET_SERVICE_TYPE table for reference and selects only OAM, which leaves eight constants deliberately unreferenced. The comment now says so, which is the justification the attribute was missing.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Applied at `ConnectedPeerSocket::open` (dormant in this PR; see
|
||||
// `connected_peer.rs`). Linux toolchain only checks gates — keep
|
||||
// the module visible on Linux so clippy doesn't lose track.
|
||||
// Applied at `ConnectedPeerSocket::open`. The full `NET_SERVICE_TYPE_*`
|
||||
// table is kept for reference although only `OAM` is selected, so most
|
||||
// of these constants are deliberately unreferenced.
|
||||
#![allow(dead_code)]
|
||||
|
||||
//! Darwin UDP socket tuning.
|
||||
|
||||
Reference in New Issue
Block a user