1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-20 09:19:36 +01:00

use Tree ctor

This commit is contained in:
Matthew Kenigsberg 2020-06-01 08:59:26 -06:00
parent 7680993506
commit c254254a80
6 changed files with 13 additions and 33 deletions

View file

@ -117,10 +117,7 @@ std::pair<Tree, time_t> downloadTarball(
if (cached && !cached->expired)
return {
Tree {
.actualPath = store->toRealPath(cached->storePath),
.storePath = std::move(cached->storePath),
},
Tree(store->toRealPath(cached->storePath), std::move(cached->storePath)),
getIntAttr(cached->infoAttrs, "lastModified")
};
@ -157,10 +154,7 @@ std::pair<Tree, time_t> downloadTarball(
immutable);
return {
Tree {
.actualPath = store->toRealPath(*unpackedStorePath),
.storePath = std::move(*unpackedStorePath),
},
Tree(store->toRealPath(*unpackedStorePath), std::move(*unpackedStorePath)),
lastModified,
};
}