Formatting for let else now exists

This commit is contained in:
2023-11-12 14:32:07 +01:00
parent 3522b38394
commit 10174a2915
2 changed files with 11 additions and 4 deletions

View File

@@ -110,10 +110,15 @@ impl BluePrint {
if u32::from(best - got) >= ideal_from_now {
continue;
}
assert!(todo.len() <= 1_000_000, "Safety: got a todo list of len {}, best: {best}",
todo.len());
assert!(
todo.len() <= 1_000_000,
"Safety: got a todo list of len {}, best: {best}",
todo.len()
);
for (element, &costs) in self.costs.iter().enumerate() {
let Some(min_to_build) = self.until_buildable(costs, resources, machines) else { break };
let Some(min_to_build) = self.until_buildable(costs, resources, machines) else {
break;
};
// +1 because we need a turn to build
let built_after = min_to_build + 1;