diff --git a/lib/src/dag_walk.rs b/lib/src/dag_walk.rs index a5707fbcb..512d6059a 100644 --- a/lib/src/dag_walk.rs +++ b/lib/src/dag_walk.rs @@ -486,8 +486,7 @@ where II: IntoIterator>, NI: IntoIterator>, { - let start: Vec = start.into_iter().try_collect()?; - let mut heads: HashSet = start.iter().cloned().collect(); + let mut heads: HashSet = start.into_iter().try_collect()?; // Do a BFS until we have only one item left in the frontier. That frontier must // have originated from one of the heads, and since there can't be cycles, // it won't be able to eliminate any other heads.