diff options
author | Alex Auvolat <alex@adnab.me> | 2023-04-21 15:58:46 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-04-21 15:58:46 +0200 |
commit | b60f5b1694aee70aea61f8de7bf5f6090c0d53e6 (patch) | |
tree | 996dccf1ba5d8653476883cf2db5f10a9ccc2349 /src | |
parent | 49d94dae1d753c1f3349be7ea9bc7e7978c0af15 (diff) | |
download | D53-b60f5b1694aee70aea61f8de7bf5f6090c0d53e6.tar.gz D53-b60f5b1694aee70aea61f8de7bf5f6090c0d53e6.zip |
cargo fmtdiplonat-autodiscovery
Diffstat (limited to 'src')
-rw-r--r-- | src/autodiscovery.rs | 19 |
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) { |