Skip to content

Commit b6ca60c

Browse files
committed
DerivationBuilder::checkPathValidity: Simplify allValid calc
Now that the loops is gone, we can just inline this mutation to a single simple expression.
1 parent 2600391 commit b6ca60c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/libstore/build/derivation-goal.cc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -363,14 +363,7 @@ std::pair<bool, SingleDrvOutputs> DerivationGoal::checkPathValidity()
363363
"derivation '%s' does not have wanted outputs '%s'", worker.store.printStorePath(drvPath), wantedOutput);
364364
}
365365

366-
bool allValid = true;
367-
{
368-
if (!outputKnown || !outputKnown->isValid()) {
369-
allValid = false;
370-
}
371-
}
372-
373-
return {allValid, validOutputs};
366+
return {outputKnown && outputKnown->isValid(), validOutputs};
374367
}
375368

376369
SingleDrvOutputs DerivationGoal::assertPathValidity()

0 commit comments

Comments
 (0)