aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-04 09:09:36 +0100
committereldritch horrors <pennae@lix.systems>2024-03-04 09:25:17 +0100
commit523250d18b4b1ec54631ae0477b6e5a8cebf3ba5 (patch)
treed63b6b9dfae1bd9ef364cc0899692cd1e456c2e2 /src
parentedb8e24ee0a828e3611014758f8716ce53fbba70 (diff)
Merge pull request #10055 from GrahamDennis/gdennis/faster-flake-lock-parsing
Faster flake.lock parsing (cherry picked from commit ff4fa4dbd307fb155155421a7ec0625383dcedeb) Change-Id: I34325834770db66fa56f0d8d02d3d2322dea3c65
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/flake/lockfile.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/flake/lockfile.cc b/src/libexpr/flake/lockfile.cc
index 3c202967a..12d304c18 100644
--- a/src/libexpr/flake/lockfile.cc
+++ b/src/libexpr/flake/lockfile.cc
@@ -89,7 +89,7 @@ LockFile::LockFile(const nlohmann::json & json, const Path & path)
std::string inputKey = i.value();
auto k = nodeMap.find(inputKey);
if (k == nodeMap.end()) {
- auto nodes = json["nodes"];
+ auto & nodes = json["nodes"];
auto jsonNode2 = nodes.find(inputKey);
if (jsonNode2 == nodes.end())
throw Error("lock file references missing node '%s'", inputKey);