Apply impl_trait_overcaptures

This commit is contained in:
Eric Huss 2025-07-05 19:29:29 -07:00
parent a0d1859575
commit b637a5fe83

View File

@ -51,7 +51,7 @@ impl<N: Eq + Ord + Clone, E: Default + Clone> Graph<N, E> {
self.nodes.get(from)?.get(to)
}
pub fn edges(&self, from: &N) -> impl Iterator<Item = (&N, &E)> {
pub fn edges(&self, from: &N) -> impl Iterator<Item = (&N, &E)> + use<'_, N, E> {
self.nodes.get(from).into_iter().flat_map(|x| x.iter())
}