We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2353f2 commit caff9baCopy full SHA for caff9ba
1 file changed
src/input/process/flow.rs
@@ -255,13 +255,13 @@ fn validate_secondary_io_flows(
255
});
256
257
for (key, value) in flow {
258
- flows.entry(key).or_insert_with(Vec::new).push(value);
+ flows.entry(key).or_default().push(value);
259
}
260
261
262
// Finally we check that the flows for a given commodity and region are defined for all
263
// years and that they are all inputs or all outputs
264
- for ((commodity_id, region_id), value) in flows.iter() {
+ for ((commodity_id, region_id), value) in &flows {
265
ensure!(
266
value.len() == process.years.len(),
267
"Flow of commodity {commodity_id} in region {region_id} for process {process_id} \
0 commit comments