peer_mgr: use flat_map

This commit is contained in:
Luna Yao
2026-04-06 11:54:01 +02:00
parent f83816ac16
commit b7073504d8
+2 -3
View File
@@ -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();
} }