diff --git a/crates/core/src/ring/connection.rs b/crates/core/src/ring/connection.rs index 04b31abaf..4b7f0756a 100644 --- a/crates/core/src/ring/connection.rs +++ b/crates/core/src/ring/connection.rs @@ -1,6 +1,6 @@ use super::Location; use super::PeerKeyLocation; -use crate::node::PeerId; + use std::time::Instant; #[derive(Clone, Debug)] @@ -9,6 +9,9 @@ pub struct Connection { pub(crate) open_at: Instant, } +#[cfg(test)] +use crate::node::PeerId; + #[cfg(test)] impl Connection { pub fn new(peer: PeerId, location: Location) -> Self { diff --git a/crates/core/src/ring/peer_key_location.rs b/crates/core/src/ring/peer_key_location.rs index d9b2d2e0f..cf3aa7595 100644 --- a/crates/core/src/ring/peer_key_location.rs +++ b/crates/core/src/ring/peer_key_location.rs @@ -1,7 +1,7 @@ use super::Location; use crate::node::PeerId; use serde::{Deserialize, Serialize}; -use std::{fmt::Display, hash::Hash, time::Instant}; +use std::{fmt::Display, hash::Hash}; #[derive(Serialize, Deserialize, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] #[cfg_attr(test, derive(arbitrary::Arbitrary))]