follow the more elegant proposal by clippy

This commit is contained in:
Christof Petig 2022-06-07 23:37:51 +02:00
parent fca4372205
commit 1c5cb8abcd

View File

@ -1427,11 +1427,14 @@ pub struct GraphInfo {
impl Default for GraphInfo {
fn default() -> Self {
let mut dummy = Economy::default();
// avoid economy of scale
dummy.pop = 0.0;
dummy.labors.iter_mut().for_each(|l| *l.1 = 0.0);
Self { dummy }
Self {
dummy: Economy {
pop: 0.0,
labors: LaborMap::from_default(0.0),
..Default::default()
},
}
}
}