Replace reversed() with apply { reverse() } or asReversed()
This commit is contained in:
@@ -45,7 +45,7 @@ public fun topologicalSort<T>(items: Iterable<T>, dependencies: (T) -> Iterable<
|
||||
for (item in items)
|
||||
DfsVisit(item)
|
||||
|
||||
return result.reversed()
|
||||
return result.apply { reverse() }
|
||||
}
|
||||
|
||||
public class CycleInTopoSortException : Exception()
|
||||
Reference in New Issue
Block a user