Skip to content

Commit da459a7

Browse files
switch to 'static
1 parent 88d4628 commit da459a7

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

iroh/src/discovery.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ impl DiscoverySubscribers {
699699
}
700700
}
701701

702-
pub(crate) fn subscribe(&self) -> impl Stream<Item = Result<DiscoveryItem, Lagged>> + use<> {
702+
pub(crate) fn subscribe(&self) -> impl Stream<Item = Result<DiscoveryItem, Lagged>> + 'static {
703703
use tokio_stream::wrappers::{BroadcastStream, errors::BroadcastStreamRecvError};
704704
let recv = self.inner.subscribe();
705705
BroadcastStream::new(recv).map_err(|BroadcastStreamRecvError::Lagged(n)| Lagged { val: n })

iroh/src/endpoint.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ impl Endpoint {
908908
/// # }
909909
/// ```
910910
#[cfg(not(wasm_browser))]
911-
pub fn node_addr(&self) -> impl n0_watcher::Watcher<Value = Option<NodeAddr>> + use<> {
911+
pub fn node_addr(&self) -> impl n0_watcher::Watcher<Value = Option<NodeAddr>> + 'static {
912912
let watch_addrs = self.direct_addresses();
913913
let watch_relay = self.home_relay();
914914
let node_id = self.node_id();
@@ -973,7 +973,7 @@ impl Endpoint {
973973
/// let _relay_url = mep.home_relay().initialized().await.unwrap();
974974
/// # });
975975
/// ```
976-
pub fn home_relay(&self) -> impl n0_watcher::Watcher<Value = Vec<RelayUrl>> + use<> {
976+
pub fn home_relay(&self) -> impl n0_watcher::Watcher<Value = Vec<RelayUrl>> + 'static {
977977
self.msock.home_relay()
978978
}
979979

@@ -1043,7 +1043,7 @@ impl Endpoint {
10431043
/// # });
10441044
/// ```
10451045
#[doc(hidden)]
1046-
pub fn net_report(&self) -> impl Watcher<Value = Option<Report>> + use<> {
1046+
pub fn net_report(&self) -> impl Watcher<Value = Option<Report>> + 'static {
10471047
self.msock.net_report()
10481048
}
10491049

@@ -1086,7 +1086,7 @@ impl Endpoint {
10861086
/// connection was ever made or is even possible.
10871087
///
10881088
/// See also [`Endpoint::remote_info`] to only retrieve information about a single node.
1089-
pub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo> + use<> {
1089+
pub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo> + 'static {
10901090
self.msock.list_remote_infos().into_iter()
10911091
}
10921092

@@ -1114,7 +1114,7 @@ impl Endpoint {
11141114
///
11151115
/// [`MdnsDiscovery`]: crate::discovery::mdns::MdnsDiscovery
11161116
/// [`StaticProvider`]: crate::discovery::static_provider::StaticProvider
1117-
pub fn discovery_stream(&self) -> impl Stream<Item = Result<DiscoveryItem, Lagged>> + use<> {
1117+
pub fn discovery_stream(&self) -> impl Stream<Item = Result<DiscoveryItem, Lagged>> + 'static {
11181118
self.msock.discovery_subscribers().subscribe()
11191119
}
11201120

iroh/src/magicsock.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ impl MagicSock {
280280
&self.ip_bind_addrs
281281
}
282282

283-
fn ip_local_addrs(&self) -> impl Iterator<Item = SocketAddr> + use<> {
283+
fn ip_local_addrs(&self) -> impl Iterator<Item = SocketAddr> + 'static {
284284
self.local_addr()
285285
.into_iter()
286286
.filter_map(|addr| addr.into_socket_addr())
@@ -336,7 +336,7 @@ impl MagicSock {
336336
///
337337
/// [`Watcher`]: n0_watcher::Watcher
338338
/// [`Watcher::initialized`]: n0_watcher::Watcher::initialized
339-
pub(crate) fn net_report(&self) -> impl Watcher<Value = Option<Report>> + use<> {
339+
pub(crate) fn net_report(&self) -> impl Watcher<Value = Option<Report>> + 'static {
340340
self.net_report
341341
.watch()
342342
.map(|(r, _)| r)
@@ -347,7 +347,7 @@ impl MagicSock {
347347
///
348348
/// Note that this can be used to wait for the initial home relay to be known using
349349
/// [`Watcher::initialized`].
350-
pub(crate) fn home_relay(&self) -> impl Watcher<Value = Vec<RelayUrl>> + use<> {
350+
pub(crate) fn home_relay(&self) -> impl Watcher<Value = Vec<RelayUrl>> + 'static {
351351
let res = self.local_addrs_watch.clone().map(|addrs| {
352352
addrs
353353
.into_iter()

iroh/src/magicsock/transports/relay/actor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ impl ActiveRelayActor {
500500
/// connections. It currently does not ever return `Err` as the retries continue
501501
/// forever.
502502
// This is using `impl Future` to return a future without a reference to self.
503-
fn dial_relay(&self) -> impl Future<Output = Result<Client, DialError>> + use<> {
503+
fn dial_relay(&self) -> impl Future<Output = Result<Client, DialError>> + 'static {
504504
let client_builder = self.relay_client_builder.clone();
505505
async move {
506506
match time::timeout(CONNECT_TIMEOUT, client_builder.connect()).await {
@@ -983,7 +983,7 @@ impl RelayActor {
983983
async fn try_send_datagram(
984984
&mut self,
985985
item: RelaySendItem,
986-
) -> Option<impl Future<Output = ()> + use<>> {
986+
) -> Option<impl Future<Output = ()> + 'static> {
987987
let url = item.url.clone();
988988
let handle = self
989989
.active_relay_handle_for_node(&item.url, &item.remote_node)
@@ -1218,7 +1218,7 @@ impl RelayActor {
12181218
});
12191219
}
12201220

1221-
fn active_relay_sorted(&self) -> impl Iterator<Item = RelayUrl> + use<> {
1221+
fn active_relay_sorted(&self) -> impl Iterator<Item = RelayUrl> + 'static {
12221222
let mut ids: Vec<_> = self.active_relays.keys().cloned().collect();
12231223
ids.sort();
12241224

iroh/src/net_report.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ impl QadConns {
160160
reports
161161
}
162162

163-
fn watch_v4(&self) -> impl n0_future::Stream<Item = Option<QadProbeReport>> + Unpin + use<> {
163+
fn watch_v4(&self) -> impl n0_future::Stream<Item = Option<QadProbeReport>> + Unpin + 'static {
164164
let watcher = self.v4.as_ref().map(|(_url, conn)| conn.observer.watch());
165165

166166
if let Some(watcher) = watcher {
@@ -170,7 +170,7 @@ impl QadConns {
170170
}
171171
}
172172

173-
fn watch_v6(&self) -> impl n0_future::Stream<Item = Option<QadProbeReport>> + Unpin + use<> {
173+
fn watch_v6(&self) -> impl n0_future::Stream<Item = Option<QadProbeReport>> + Unpin + 'static {
174174
let watcher = self.v6.as_ref().map(|(_url, conn)| conn.observer.watch());
175175
if let Some(watcher) = watcher {
176176
watcher.stream_updates_only().boxed()

0 commit comments

Comments
 (0)