diff --git a/crates/tor-circmgr/src/timeouts.rs b/crates/tor-circmgr/src/timeouts.rs index 1c4cded52..95c2700fe 100644 --- a/crates/tor-circmgr/src/timeouts.rs +++ b/crates/tor-circmgr/src/timeouts.rs @@ -6,8 +6,6 @@ //! slow. Second, these timeouts are actually a security //! property. (XXXX explain why!) -#![allow(dead_code)] - use std::time::Duration; pub(crate) mod estimator; @@ -76,6 +74,7 @@ pub(crate) enum Action { length: usize, }, /// Extend a given circuit from one length to another. + #[allow(dead_code)] ExtendCircuit { /// The current length of the circuit. initial_length: usize, @@ -85,6 +84,7 @@ pub(crate) enum Action { final_length: usize, }, /// Send a message to the last hop of a circuit and receive a response + #[allow(dead_code)] RoundTrip { /// The length of the circuit. length: usize, diff --git a/crates/tor-circmgr/src/timeouts/estimator.rs b/crates/tor-circmgr/src/timeouts/estimator.rs index 5f60bfca2..e16a8aa97 100644 --- a/crates/tor-circmgr/src/timeouts/estimator.rs +++ b/crates/tor-circmgr/src/timeouts/estimator.rs @@ -20,6 +20,7 @@ pub(crate) struct Estimator { impl Estimator { /// Construct a new estimator from some variant. + #[cfg(test)] pub(crate) fn new(est: impl TimeoutEstimator + Send + 'static) -> Self { Self { inner: Mutex::new(Box::new(est)),