| ... | ... | @@ -460,10 +460,19 @@ pub fn ArrayHashMapWithAllocator( |
| 460 | 460 | /// Sorts the entries and then rebuilds the index. |
| 461 | 461 | /// `sort_ctx` must have this method: |
| 462 | 462 | /// `fn lessThan(ctx: @TypeOf(ctx), a_index: usize, b_index: usize) bool` |
| 463 | /// Uses a stable sorting algorithm. |
| 463 | 464 | pub fn sort(self: *Self, sort_ctx: anytype) void { |
| 464 | 465 | return self.unmanaged.sortContext(sort_ctx, self.ctx); |
| 465 | 466 | } |
| 466 | 467 | |
| 468 | /// Sorts the entries and then rebuilds the index. |
| 469 | /// `sort_ctx` must have this method: |
| 470 | /// `fn lessThan(ctx: @TypeOf(ctx), a_index: usize, b_index: usize) bool` |
| 471 | /// Uses an unstable sorting algorithm. |
| 472 | pub fn sortUnstable(self: *Self, sort_ctx: anytype) void { |
| 473 | return self.unmanaged.sortUnstableContext(sort_ctx, self.ctx); |
| 474 | } |
| 475 | |
| 467 | 476 | /// Shrinks the underlying `Entry` array to `new_len` elements and |
| 468 | 477 | /// discards any associated index entries. Keeps capacity the same. |
| 469 | 478 | /// |