summaryrefslogtreecommitdiff
path: root/crates/tor-proto/src/tunnel.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/tor-proto/src/tunnel.rs')
-rw-r--r--crates/tor-proto/src/tunnel.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/crates/tor-proto/src/tunnel.rs b/crates/tor-proto/src/tunnel.rs
index 96fa41ebc..1f1088dd4 100644
--- a/crates/tor-proto/src/tunnel.rs
+++ b/crates/tor-proto/src/tunnel.rs
@@ -33,22 +33,25 @@ impl TunnelId {
/// process-unique, but in the logs it's often useful to display the
/// owning tunnel's ID alongside the circuit identifier.
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, Display)]
-#[display("{} ({})", circ_id, tunnel_id)]
+#[display("{} ({})", circ_uniq_id, tunnel_id)]
pub(crate) struct TunnelScopedCircId {
/// The identifier of the owning tunnel
tunnel_id: TunnelId,
/// The process-unique identifier of the circuit
- circ_id: UniqId,
+ circ_uniq_id: UniqId,
}
impl TunnelScopedCircId {
/// Create a new [`TunnelScopedCircId`] from the specified identifiers.
- pub(crate) fn new(tunnel_id: TunnelId, circ_id: UniqId) -> Self {
- Self { tunnel_id, circ_id }
+ pub(crate) fn new(tunnel_id: TunnelId, circ_uniq_id: UniqId) -> Self {
+ Self {
+ tunnel_id,
+ circ_uniq_id,
+ }
}
/// Return the [`UniqId`].
pub(crate) fn unique_id(&self) -> UniqId {
- self.circ_id
+ self.circ_uniq_id
}
}