aboutsummaryrefslogtreecommitdiff
path: root/src/nix/prefetch.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/prefetch.cc')
-rw-r--r--src/nix/prefetch.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/nix/prefetch.cc b/src/nix/prefetch.cc
index 3b2e225f6..b67d381ca 100644
--- a/src/nix/prefetch.cc
+++ b/src/nix/prefetch.cc
@@ -71,10 +71,8 @@ std::tuple<StorePath, Hash> prefetchFile(
if (expectedHash) {
hashType = expectedHash->type;
storePath = store->makeFixedOutputPath(*name, FixedOutputInfo {
- .hash = {
- .method = ingestionMethod,
- .hash = *expectedHash,
- },
+ .method = ingestionMethod,
+ .hash = *expectedHash,
.references = {},
});
if (store->isValidPath(*storePath))
@@ -127,7 +125,7 @@ std::tuple<StorePath, Hash> prefetchFile(
auto info = store->addToStoreSlow(*name, tmpFile, ingestionMethod, hashType, expectedHash);
storePath = info.path;
assert(info.ca);
- hash = info.ca->getHash();
+ hash = info.ca->hash;
}
return {storePath.value(), hash.value()};