1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-13 14:02:42 +01:00

DerivationBuilder::checkPathValidity: Simplify allValid calc

Now that the loops is gone, we can just inline this mutation to a single
simple expression.
This commit is contained in:
John Ericson 2025-08-13 23:01:58 -04:00
parent 2600391147
commit b6ca60cb82

View file

@ -363,14 +363,7 @@ std::pair<bool, SingleDrvOutputs> DerivationGoal::checkPathValidity()
"derivation '%s' does not have wanted outputs '%s'", worker.store.printStorePath(drvPath), wantedOutput); "derivation '%s' does not have wanted outputs '%s'", worker.store.printStorePath(drvPath), wantedOutput);
} }
bool allValid = true; return {outputKnown && outputKnown->isValid(), validOutputs};
{
if (!outputKnown || !outputKnown->isValid()) {
allValid = false;
}
}
return {allValid, validOutputs};
} }
SingleDrvOutputs DerivationGoal::assertPathValidity() SingleDrvOutputs DerivationGoal::assertPathValidity()