Get rid of platform differences in MutableList.sortWith() doc

This commit is contained in:
Abduqodiri Qurbonzoda
2021-05-31 01:37:55 +03:00
committed by Space
parent a9946b01e6
commit c64592665b
2 changed files with 4 additions and 0 deletions
@@ -18,6 +18,8 @@ public actual fun <T : Comparable<T>> MutableList<T>.sort(): Unit = sortWith(nat
* Sorts elements in the list in-place according to the order specified with [comparator].
*
* The sort is _stable_. It means that equal elements preserve their order relative to each other after sorting.
*
* @sample samples.collections.Collections.Sorting.sortMutableListWith
*/
public actual fun <T> MutableList<T>.sortWith(comparator: Comparator<in T>): Unit {
if (size > 1) {
@@ -159,6 +159,8 @@ public actual fun <T : Comparable<T>> MutableList<T>.sort(): Unit {
* Sorts elements in the list in-place according to the order specified with [comparator].
*
* The sort is _stable_. It means that equal elements preserve their order relative to each other after sorting.
*
* @sample samples.collections.Collections.Sorting.sortMutableListWith
*/
public actual fun <T> MutableList<T>.sortWith(comparator: Comparator<in T>): Unit {
collectionsSort(this, comparator)