1
1
Fork 0
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:
Eelco Dolstra 2023-07-21 13:46:53 +02:00 committed by GitHub
commit 7ac24d9525
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 182 additions and 293 deletions

View file

@ -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. */