mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-02-08 21:23:03 +08:00
perf: count > 0
can be anyMatch
This commit is contained in:
parent
e4123f47d6
commit
b7735295f1
@ -57,7 +57,7 @@ public class KahnsSort {
|
||||
}
|
||||
}
|
||||
|
||||
if (degreeList.values().stream().filter(value -> value != 0).count() != 0)
|
||||
if (degreeList.values().stream().anyMatch(value -> value != 0))
|
||||
return null; // Loop found
|
||||
|
||||
return orderedList;
|
||||
|
Loading…
Reference in New Issue
Block a user