aboutsummaryrefslogtreecommitdiff
path: root/src/autodiscovery.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-04-21 15:58:46 +0200
committerAlex Auvolat <alex@adnab.me>2023-04-21 15:58:46 +0200
commitb60f5b1694aee70aea61f8de7bf5f6090c0d53e6 (patch)
tree996dccf1ba5d8653476883cf2db5f10a9ccc2349 /src/autodiscovery.rs
parent49d94dae1d753c1f3349be7ea9bc7e7978c0af15 (diff)
downloadD53-diplonat-autodiscovery.tar.gz
D53-diplonat-autodiscovery.zip
Diffstat (limited to 'src/autodiscovery.rs')
-rw-r--r--src/autodiscovery.rs19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/autodiscovery.rs b/src/autodiscovery.rs
index 86276c1..aa33d01 100644
--- a/src/autodiscovery.rs
+++ b/src/autodiscovery.rs
@@ -109,9 +109,22 @@ fn parse_autodiscovered_address(
}
impl AutodiscoveredAddresses {
- fn strip_timestamps(&self) -> (HashMap<&str, Option<Ipv4Addr>>, HashMap<&str, Option<Ipv6Addr>>) {
- (self.ipv4.iter().map(|(k, v)| (k.as_str(), v.address)).collect(),
- self.ipv6.iter().map(|(k, v)| (k.as_str(), v.address)).collect())
+ fn strip_timestamps(
+ &self,
+ ) -> (
+ HashMap<&str, Option<Ipv4Addr>>,
+ HashMap<&str, Option<Ipv6Addr>>,
+ ) {
+ (
+ self.ipv4
+ .iter()
+ .map(|(k, v)| (k.as_str(), v.address))
+ .collect(),
+ self.ipv6
+ .iter()
+ .map(|(k, v)| (k.as_str(), v.address))
+ .collect(),
+ )
}
fn dump(&self) {