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 | bff42bf27f58bacb8bce58458dea7da74cda2c05 (patch) | |
| tree | f06e584a2237f84007533b964144d45fedd21924 /src/transport/mod.rs | |
| parent | 4250d9843133d38c7ace1a1b510265a15ebaa0fd (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, } |
