Skip to content

Commit b02df8a

Browse files
committed
chore: typos, doclinks, clippy
1 parent 147d1a0 commit b02df8a

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

iroh/src/magicsock/endpoint_map/endpoint_state.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -729,10 +729,7 @@ impl EndpointStateActor {
729729
let Some(relay_addr) = self
730730
.paths
731731
.addrs()
732-
.filter_map(|addr| match addr {
733-
transports::Addr::Ip(_) => None,
734-
transports::Addr::Relay(_, _) => Some(addr),
735-
})
732+
.filter(|addr| addr.is_relay())
736733
.next()
737734
.cloned()
738735
else {
@@ -1424,7 +1421,7 @@ impl Future for OnClosed {
14241421
}
14251422
}
14261423

1427-
/// Converts an interator of [`TransportAddr'] into an iterator of [`transports::Addr`].
1424+
/// Converts an iterator of [`TransportAddr'] into an iterator of [`transports::Addr`].
14281425
fn to_transports_addr(
14291426
endpoint_id: EndpointId,
14301427
addrs: impl IntoIterator<Item = TransportAddr>,

iroh/src/magicsock/endpoint_map/endpoint_state/path_state.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl EndpointPathState {
117117
self.paths.keys()
118118
}
119119

120-
/// Replies to all pending requests from [`EndpointStateMessage::ResolveRemote`].
120+
/// Replies to all pending resolve requests.
121121
///
122122
/// This is a no-op if no requests are queued. Replies `Ok` if we have any known paths,
123123
/// otherwise with the provided `discovery_error` or with [`DiscoveryError::NoResults`].
@@ -139,10 +139,7 @@ impl EndpointPathState {
139139
/// The state of a single path to the remote endpoint.
140140
///
141141
/// Each path is identified by the destination [`transports::Addr`] and they are stored in
142-
/// the [`EndpointStateActor::paths`] map.
143-
///
144-
/// [`transports::Addr`]: super::transports::Addr
145-
/// [`EndpointStateActor::paths`]: super::endpoint_state::EndpointStateActor
142+
/// the [`EndpointPathState::paths`] map.
146143
#[derive(Debug, Default)]
147144
pub(super) struct PathState {
148145
/// How we learned about this path, and when.

0 commit comments

Comments
 (0)