mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-02 09:09:17 +00:00
peer_mgr: use flat_map
This commit is contained in:
@@ -78,8 +78,7 @@ impl DnsPeerMgr {
|
|||||||
.chain(
|
.chain(
|
||||||
self.peers
|
self.peers
|
||||||
.iter()
|
.iter()
|
||||||
.map(|(_, info)| info.zones.into_iter())
|
.flat_map(|(_, info)| info.zones.into_iter()),
|
||||||
.flatten(),
|
|
||||||
)
|
)
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
@@ -112,7 +111,7 @@ impl DnsPeerMgr {
|
|||||||
self.peers.invalidate(&peer_id).await;
|
self.peers.invalidate(&peer_id).await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.dirty.notify_one();
|
self.dirty.notify_one();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user