aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-02-14 22:42:35 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-02-14 22:42:35 +0100
commit6208d24c383e95a50e873ed987643ffa329f9428 (patch)
tree842593287ea8286066e85edb88fec638e181ee57 /src/nix
parent9659940659b36ffab3cbd1eff9f343c9ada2491b (diff)
parent9af10b753c8a636f828b148fc3a9aecd1c0067fa (diff)
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/why-depends.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix/why-depends.cc b/src/nix/why-depends.cc
index 900466538..a9a5ec8f8 100644
--- a/src/nix/why-depends.cc
+++ b/src/nix/why-depends.cc
@@ -103,7 +103,7 @@ struct CmdWhyDepends : SourceExprCommand
std::map<StorePath, Node> graph;
for (auto & path : closure)
- graph.emplace(path.clone(), Node{path.clone(), cloneStorePathSet(store->queryPathInfo(path)->references)});
+ graph.emplace(path.clone(), Node { .path = path.clone(), .refs = cloneStorePathSet(store->queryPathInfo(path)->references) });
// Transpose the graph.
for (auto & node : graph)
@@ -112,7 +112,7 @@ struct CmdWhyDepends : SourceExprCommand
/* Run Dijkstra's shortest path algorithm to get the distance
of every path in the closure to 'dependency'. */
- graph[dependencyPath.clone()].dist = 0;
+ graph.emplace(dependencyPath.clone(), Node { .path = dependencyPath.clone(), .dist = 0 });
std::priority_queue<Node *> queue;