From e4b75957a7053227285d855d9aff44505f8ca8b9 Mon Sep 17 00:00:00 2001 From: Andrew Golovashevich Date: Wed, 25 Feb 2026 17:17:28 +0300 Subject: [PATCH] [lab5] Minor fixes --- lab5/src/gui/graph.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lab5/src/gui/graph.rs b/lab5/src/gui/graph.rs index eb1b11c..37e2a51 100644 --- a/lab5/src/gui/graph.rs +++ b/lab5/src/gui/graph.rs @@ -39,10 +39,10 @@ fn draw_ants(ui: &mut Ui, vertex_locations: &mut [(f32, f32)], data: &GeneticSim chromosome.iter().reduce(|a, b| { match data.graph.vertices[*a] .iter() - .position(|e| data.graph.edges[*e].another(*a) == *b) + .find(|e| data.graph.edges[**e].another(*a) == *b) { None => unreachable!(), - Some(e) => usage[e] += 1, + Some(e) => usage[*e] += 1, }; return b; });