Skip to content

Commit e1e2e4d

Browse files
author
“ramfox”
committed
doc and clippy fixes
1 parent b954009 commit e1e2e4d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

iroh/src/magicsock/remote_map/remote_state/path_state.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ pub(super) struct PathState {
182182
///
183183
/// Always prunes paths that have unsuccessfully holepunched.
184184
///
185-
/// Keeps [`MAX_INACTIVE_PATHS`] of the most recently closed paths
185+
/// Keeps [`MAX_INACTIVE_IP_PATHS`] of the most recently closed paths
186186
/// that are not currently being used but have successfully been
187187
/// holepunched previously.
188188
///
@@ -247,8 +247,10 @@ fn prune_ip_paths(paths: &mut FxHashMap<transports::Addr, PathState>) {
247247

248248
#[cfg(test)]
249249
mod tests {
250-
use std::net::{Ipv4Addr, SocketAddrV4};
251-
use std::time::Duration;
250+
use std::{
251+
net::{Ipv4Addr, SocketAddrV4},
252+
time::Duration,
253+
};
252254

253255
use iroh_base::{RelayUrl, SecretKey};
254256
use rand::SeedableRng;
@@ -434,7 +436,7 @@ mod tests {
434436
// Add 10 relay addresses
435437
for _ in 0..10 {
436438
let id = SecretKey::generate(&mut rng).public();
437-
let relay_addr = transports::Addr::Relay(relay_url.clone().into(), id);
439+
let relay_addr = transports::Addr::Relay(relay_url.clone(), id);
438440
paths.insert(relay_addr, PathState::default());
439441
}
440442

0 commit comments

Comments
 (0)