From eab5a63e6c7fe6776ff7bc7a4431d1c1f9b28cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Thu, 15 Oct 2026 08:45:18 +0200 Subject: [PATCH] Fix loop patterns --- src/testing/fixtures.rs | 4 ++-- tests/dfs.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/testing/fixtures.rs b/src/testing/fixtures.rs index 721bf1f..b118fe7 100644 --- a/src/testing/fixtures.rs +++ b/src/testing/fixtures.rs @@ -392,7 +392,7 @@ pub fn assert_isomorphic( original.edge_count(), "other graph should have the same edge count as the original" ); - for &v in vertices.iter() { + for &v in vertices { assert_eq!( other.degree(vertex_map(v)), original.degree(v), @@ -415,7 +415,7 @@ pub fn assert_isomorphic( "expected incidences {expected:?} of vertex {v:?} are missing in the other graph" ); } - for &(e, u, v) in edges.iter() { + for &(e, u, v) in edges { assert_eq!( other.incident_vertices(edge_map(e)), (vertex_map(u), vertex_map(v)), diff --git a/tests/dfs.rs b/tests/dfs.rs index 39afd23..0875463 100644 --- a/tests/dfs.rs +++ b/tests/dfs.rs @@ -162,7 +162,7 @@ where G::Vertex: Debug, { let (graph, vertices, _, _) = G::standard(); - for v in vertices { + for &v in &vertices { assert!( algorithms::dfs_find(&graph, vertices[0], v), "vertex {v:?} should be reachable from {:?}",