clone range in a more obvious way

This commit is contained in:
Matthias Krüger 2024-10-12 21:38:06 +02:00
parent 464f4057c2
commit d84d659cb5

View File

@ -187,10 +187,7 @@ pub(crate) fn vars_since_snapshot(
value_count: usize,
) -> (Range<TyVid>, Vec<TypeVariableOrigin>) {
let range = TyVid::from_usize(value_count)..TyVid::from_usize(self.num_vars());
(
range.start..range.end,
(range.start..range.end).map(|index| self.var_origin(index)).collect(),
)
(range.clone(), range.map(|index| self.var_origin(index)).collect())
}
/// Returns indices of all variables that are not yet