From 523250d18b4b1ec54631ae0477b6e5a8cebf3ba5 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Mon, 4 Mar 2024 09:09:36 +0100 Subject: [PATCH] Merge pull request #10055 from GrahamDennis/gdennis/faster-flake-lock-parsing Faster flake.lock parsing (cherry picked from commit ff4fa4dbd307fb155155421a7ec0625383dcedeb) Change-Id: I34325834770db66fa56f0d8d02d3d2322dea3c65 --- src/libexpr/flake/lockfile.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);