Skip to content

Commit

Permalink
clone range in a more obvious way
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Oct 23, 2024
1 parent 464f405 commit d84d659
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions compiler/rustc_infer/src/infer/type_variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,7 @@ impl<'tcx> TypeVariableTable<'_, 'tcx> {
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
Expand Down

0 comments on commit d84d659

Please sign in to comment.