aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/mod.rs')
-rw-r--r--src/transport/mod.rs6
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,
}