refactor: replace for with for_each

This commit is contained in:
electria 2026-08-16 18:39:25 -07:00
commit d1fb0ca78a
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs

View file

@ -75,10 +75,10 @@ impl State {
.map(|value| Graph::new(value))
.collect();
} else {
for (graph, value) in self.cpu_graphs.iter_mut().zip(snapshot.cpus.into_iter())
{
graph.update(value);
}
self.cpu_graphs
.iter_mut()
.zip(snapshot.cpus.into_iter())
.for_each(|(graph, value)| graph.update(value));
}
}
}