From b26fbdb24feee0121228a5a26e05130248300614 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sat, 13 Nov 2021 11:14:11 -0500 Subject: [PATCH] Resolve a dead-code warning on nightly. The `circid` field in `ClientCirc` is now testing-only. --- crates/tor-proto/src/circuit.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/tor-proto/src/circuit.rs b/crates/tor-proto/src/circuit.rs index 83d7aff45..30799d7ab 100644 --- a/crates/tor-proto/src/circuit.rs +++ b/crates/tor-proto/src/circuit.rs @@ -89,6 +89,7 @@ pub struct ClientCirc { /// Channel to send control messages to the reactor. control: mpsc::UnboundedSender, /// For testing purposes: the CircId, for use in peek_circid(). + #[cfg(test)] circid: CircId, } @@ -425,6 +426,7 @@ impl PendingClientCirc { hops: num_hops, unique_id, control: control_tx, + #[cfg(test)] circid: id, };