diff --git a/iroh/src/discovery.rs b/iroh/src/discovery.rs index c23789b5782..beb5b947d51 100644 --- a/iroh/src/discovery.rs +++ b/iroh/src/discovery.rs @@ -111,7 +111,7 @@ doc = "[`LocalSwarmDiscovery`]: local_swarm_discovery::LocalSwarmDiscovery" )] -use std::{collections::BTreeSet, net::SocketAddr, time::Duration}; +use std::{collections::BTreeSet, net::SocketAddr, sync::Arc, time::Duration}; use anyhow::{anyhow, ensure, Result}; use futures_lite::stream::{Boxed as BoxStream, StreamExt}; @@ -194,6 +194,8 @@ pub trait Discovery: std::fmt::Debug + Send + Sync { } } +impl Discovery for Arc {} + /// The results returned from [`Discovery::resolve`]. #[derive(Debug, Clone)] pub struct DiscoveryItem {