peer_mgr: use flat_map

This commit is contained in:
Luna Yao
2026-02-21 20:27:19 +01:00
parent f83816ac16
commit b7073504d8
+2 -3
View File
@@ -78,8 +78,7 @@ impl DnsPeerMgr {
.chain(
self.peers
.iter()
.map(|(_, info)| info.zones.into_iter())
.flatten(),
.flat_map(|(_, info)| info.zones.into_iter()),
)
.collect();
@@ -112,7 +111,7 @@ impl DnsPeerMgr {
self.peers.invalidate(&peer_id).await;
}
}
self.dirty.notify_one();
}