From 12b03c3ef3b461e6a8d63a8a33099fd63d8f6a00 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Wed, 2 Feb 2022 17:54:22 +0100 Subject: [PATCH] Code cleanup --- src/undirected/connected_components.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/undirected/connected_components.rs b/src/undirected/connected_components.rs index e5914bbc..8a955db1 100644 --- a/src/undirected/connected_components.rs +++ b/src/undirected/connected_components.rs @@ -10,7 +10,7 @@ use std::usize; /// Lookup entries until we get the same value as the index, with /// path halving. Adding a new entry to the table consists /// into pushing the table length. -fn get_and_redirect(table: &mut Vec, mut idx: usize) -> usize { +fn get_and_redirect(table: &mut [usize], mut idx: usize) -> usize { while idx != table[idx] { table[idx] = table[table[idx]]; idx = table[idx];