aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-09-25 09:49:15 +0200
committerGitHub <noreply@github.com>2020-09-25 09:49:15 +0200
commit2e5ff87d0ea30561633ea5abd0c03c164de2894f (patch)
tree9de85c5f857dff3ba76c332b23800343f884e2e7
parent5a7fd38dbb0d0b3485c365486691cc018fb35575 (diff)
parent4d863a9fcb9460a9e4978466e03d2982d32e39f0 (diff)
Merge pull request #4065 from paulopiyo777/flakeBranch
Remove redundant value checks
-rw-r--r--src/libexpr/flake/flake.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libexpr/flake/flake.cc b/src/libexpr/flake/flake.cc
index 460eea5ea..760ed1a6e 100644
--- a/src/libexpr/flake/flake.cc
+++ b/src/libexpr/flake/flake.cc
@@ -48,17 +48,17 @@ static std::tuple<fetchers::Tree, FlakeRef, FlakeRef> fetchOrSubstituteTree(
resolvedRef = originalRef.resolve(state.store);
auto fetchedResolved = lookupInFlakeCache(flakeCache, originalRef);
if (!fetchedResolved) fetchedResolved.emplace(resolvedRef.fetchTree(state.store));
- flakeCache.push_back({resolvedRef, fetchedResolved.value()});
- fetched.emplace(fetchedResolved.value());
+ flakeCache.push_back({resolvedRef, *fetchedResolved});
+ fetched.emplace(*fetchedResolved);
}
else {
throw Error("'%s' is an indirect flake reference, but registry lookups are not allowed", originalRef);
}
}
- flakeCache.push_back({originalRef, fetched.value()});
+ flakeCache.push_back({originalRef, *fetched});
}
- auto [tree, lockedRef] = fetched.value();
+ auto [tree, lockedRef] = *fetched;
debug("got tree '%s' from '%s'",
state.store->printStorePath(tree.storePath), lockedRef);