[lab5] Minor fixes

This commit is contained in:
Andrew Golovashevich 2026-02-25 17:17:28 +03:00
parent dab2d16e38
commit e4b75957a7

View File

@ -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;
});