1
Fork 0

Use for_each instead of fold.

This commit is contained in:
Camille GILLOT 2024-01-07 20:09:26 +00:00
parent 3082028be3
commit 1d6723a77a

View file

@ -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);
});
}
@ -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);
});
}