Skip to content

Commit

Permalink
Use for_each instead of fold.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Jan 7, 2024
1 parent 3082028 commit 1d6723a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_mir_dataflow/src/points.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ where
) {
let point = self.elements.point_from_location(location);
// Use internal iterator manually as it is much more efficient.
state.iter().fold((), |(), node| {
state.iter().for_each(|node| {
self.values.insert(node, point);
});
}
Expand All @@ -149,7 +149,7 @@ where
) {
let point = self.elements.point_from_location(location);
// Use internal iterator manually as it is much more efficient.
state.iter().fold((), |(), node| {
state.iter().for_each(|node| {
self.values.insert(node, point);
});
}
Expand Down

0 comments on commit 1d6723a

Please sign in to comment.