mirror of
https://github.com/NixOS/nix.git
synced 2025-12-06 00:51:00 +01:00
Merge pull request #8650 from obsidiansystems/content-address-simpler
Simplify `ContentAddress`
This commit is contained in:
commit
7ac24d9525
20 changed files with 182 additions and 293 deletions
|
|
@ -2540,16 +2540,16 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs()
|
|||
},
|
||||
|
||||
[&](const DerivationOutput::CAFixed & dof) {
|
||||
auto wanted = dof.ca.getHash();
|
||||
auto & wanted = dof.ca.hash;
|
||||
|
||||
auto newInfo0 = newInfoFromCA(DerivationOutput::CAFloating {
|
||||
.method = dof.ca.getMethod(),
|
||||
.method = dof.ca.method,
|
||||
.hashType = wanted.type,
|
||||
});
|
||||
|
||||
/* Check wanted hash */
|
||||
assert(newInfo0.ca);
|
||||
auto got = newInfo0.ca->getHash();
|
||||
auto & got = newInfo0.ca->hash;
|
||||
if (wanted != got) {
|
||||
/* Throw an error after registering the path as
|
||||
valid. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue