diff options
Diffstat (limited to 'lib/lists.nix')
-rw-r--r-- | lib/lists.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lists.nix b/lib/lists.nix index 30d87ece66412..93a554f24f84f 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -446,11 +446,11 @@ rec { if length list < 2 then # finish { result = list; } - else if dfsthis ? "cycle" + else if dfsthis ? cycle then # there's a cycle, starting from the current vertex, return it { cycle = reverseList ([ dfsthis.cycle ] ++ dfsthis.visited); inherit (dfsthis) loops; } - else if toporest ? "cycle" + else if toporest ? cycle then # there's a cycle somewhere else in the graph, return it toporest # Slow, but short. Can be made a bit faster with an explicit stack. |