diff options
| author | tv <tv@krebsco.de> | 2026-10-30 15:24:41 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-30 15:24:41 +0100 |
| commit | 785d4f136da4ef556d29fc4f56258d7e6350b96b (patch) | |
| tree | 157635d3264cd382e54cb36e1aff0e2e2d392c6b /src/transport/mod.rs | |
| parent | e96d88715cdff7b62cc7976902337dce0ffd7ffa (diff) | |
allow dead Connection unless a transport needs it
Diffstat (limited to 'src/transport/mod.rs')
| -rw-r--r-- | src/transport/mod.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs index 40fdfc0..b10c799 100644 --- a/src/transport/mod.rs +++ b/src/transport/mod.rs @@ -382,9 +382,13 @@ pub(crate) struct Punching { /// How a transport with connections (libp2p) is connected to a peer. #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)] #[serde(rename_all = "camelCase")] +// Only libp2p and Tor have connections; without both (the cargo features) nothing makes +// one. +#[cfg_attr(not(any(feature = "libp2p", feature = "tor")), allow(dead_code))] pub(crate) enum Connection { + /// libp2p's to the peer itself; Tor's always (an onion circuit). Direct, - /// Only through a relay. + /// Only through a relay (libp2p). Relayed, } |
