mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +01:00
libutil: Make HashResult a proper struct
This resolves an existing TODO and makes the code slightly more readable.
This commit is contained in:
parent
241420a788
commit
143bd60136
18 changed files with 56 additions and 50 deletions
|
|
@ -368,16 +368,16 @@ StorePath BinaryCacheStore::addToStoreFromDump(
|
|||
name,
|
||||
ContentAddressWithReferences::fromParts(
|
||||
hashMethod,
|
||||
caHash ? *caHash : nar.first,
|
||||
caHash ? *caHash : nar.hash,
|
||||
{
|
||||
.others = references,
|
||||
// caller is not capable of creating a self-reference, because this is content-addressed
|
||||
// without modulus
|
||||
.self = false,
|
||||
}),
|
||||
nar.first,
|
||||
nar.hash,
|
||||
};
|
||||
info.narSize = nar.second;
|
||||
info.narSize = nar.numBytesDigested;
|
||||
return info;
|
||||
})
|
||||
->path;
|
||||
|
|
@ -493,9 +493,9 @@ StorePath BinaryCacheStore::addToStore(
|
|||
// without modulus
|
||||
.self = false,
|
||||
}),
|
||||
nar.first,
|
||||
nar.hash,
|
||||
};
|
||||
info.narSize = nar.second;
|
||||
info.narSize = nar.numBytesDigested;
|
||||
return info;
|
||||
})
|
||||
->path;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue