Commit b0c6d88
authored
Rollup merge of rust-lang#140526 - Natr1x:sort-direction-documentation, r=dtolnay
docs: Specify that common sort functions sort in an ascending direction
From [forum discussion](https://users.rust-lang.org/t/is-there-a-way-to-sort-a-slice-in-specifically-ascending-or-descending-order/128998?u=natr1x) it seems like the sorting direction can be expected to always be ascending (in terms of `cmp::Ordering`).
If this is the case then it would be nice to have this stated in the documentation.2 files changed
+12
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
200 | | - | |
| 201 | + | |
| 202 | + | |
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
| |||
252 | 254 | | |
253 | 255 | | |
254 | 256 | | |
255 | | - | |
| 257 | + | |
| 258 | + | |
256 | 259 | | |
257 | 260 | | |
258 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2986 | 2986 | | |
2987 | 2987 | | |
2988 | 2988 | | |
2989 | | - | |
| 2989 | + | |
2990 | 2990 | | |
2991 | 2991 | | |
2992 | 2992 | | |
| |||
3047 | 3047 | | |
3048 | 3048 | | |
3049 | 3049 | | |
3050 | | - | |
3051 | | - | |
| 3050 | + | |
| 3051 | + | |
3052 | 3052 | | |
3053 | 3053 | | |
3054 | 3054 | | |
| |||
3102 | 3102 | | |
3103 | 3103 | | |
3104 | 3104 | | |
3105 | | - | |
3106 | | - | |
| 3105 | + | |
| 3106 | + | |
3107 | 3107 | | |
3108 | 3108 | | |
3109 | 3109 | | |
| |||
0 commit comments