mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-05-13 20:42:34 +08:00
perf: count > 0 can be anyMatch
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user