lib.lists.listDfs: compare to [] instead of checking length
This commit is contained in:
+2
-2
@@ -1184,13 +1184,13 @@ rec {
|
||||
c = filter (x: before x us) visited;
|
||||
b = partition (x: before x us) rest;
|
||||
in
|
||||
if stopOnCycles && (length c > 0) then
|
||||
if stopOnCycles && c != [ ] then
|
||||
{
|
||||
cycle = us;
|
||||
loops = c;
|
||||
inherit visited rest;
|
||||
}
|
||||
else if length b.right == 0 then
|
||||
else if b.right == [ ] then
|
||||
# nothing is before us
|
||||
{
|
||||
minimal = us;
|
||||
|
||||
Reference in New Issue
Block a user