aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/flake/flake.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-02-14 22:45:33 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-02-14 22:45:33 +0100
commit46a284263fe03bc81950586376b9be43d1b5c713 (patch)
treefdcebfec77287da10f4089d4674457b5f07a67b0 /src/libexpr/flake/flake.cc
parent6208d24c383e95a50e873ed987643ffa329f9428 (diff)
Fix build
Diffstat (limited to 'src/libexpr/flake/flake.cc')
-rw-r--r--src/libexpr/flake/flake.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libexpr/flake/flake.cc b/src/libexpr/flake/flake.cc
index 6b98cfad2..a30637262 100644
--- a/src/libexpr/flake/flake.cc
+++ b/src/libexpr/flake/flake.cc
@@ -240,8 +240,8 @@ static Flake getFlake(
edition = vInfo.attrs->get(sEpoch);
if (edition) {
- expectType(state, tInt, *(**edition).value, *(**edition).pos);
- flake.edition = (**edition).value->integer;
+ expectType(state, tInt, *edition->value, *edition->pos);
+ flake.edition = edition->value->integer;
if (flake.edition > 201909)
throw Error("flake '%s' requires unsupported edition %d; please upgrade Nix", lockedRef, flake.edition);
if (flake.edition < 201909)
@@ -250,20 +250,20 @@ static Flake getFlake(
throw Error("flake '%s' lacks attribute 'edition'", lockedRef);
if (auto description = vInfo.attrs->get(state.sDescription)) {
- expectType(state, tString, *(**description).value, *(**description).pos);
- flake.description = (**description).value->string.s;
+ expectType(state, tString, *description->value, *description->pos);
+ flake.description = description->value->string.s;
}
auto sInputs = state.symbols.create("inputs");
- if (std::optional<Attr *> inputs = vInfo.attrs->get(sInputs))
- flake.inputs = parseFlakeInputs(state, (**inputs).value, *(**inputs).pos);
+ if (auto inputs = vInfo.attrs->get(sInputs))
+ flake.inputs = parseFlakeInputs(state, inputs->value, *inputs->pos);
auto sOutputs = state.symbols.create("outputs");
if (auto outputs = vInfo.attrs->get(sOutputs)) {
- expectType(state, tLambda, *(**outputs).value, *(**outputs).pos);
- flake.vOutputs = (**outputs).value;
+ expectType(state, tLambda, *outputs->value, *outputs->pos);
+ flake.vOutputs = outputs->value;
if (flake.vOutputs->lambda.fun->matchAttrs) {
for (auto & formal : flake.vOutputs->lambda.fun->formals->formals) {