std: add unstable sorting to array hash maps

closes #17426
This commit is contained in:
Andrew Kelley
2023-10-06 23:58:53 -07:00
parent 1ca4428324
commit cbb9b5d9f0
3 changed files with 33 additions and 4 deletions

View File

@@ -467,7 +467,7 @@ pub fn MultiArrayList(comptime T: type) type {
/// `ctx` has the following method:
/// `fn lessThan(ctx: @TypeOf(ctx), a_index: usize, b_index: usize) bool`
fn sortInternal(self: Self, a: usize, b: usize, ctx: anytype, comptime mode: enum { stable, unstable }) void {
fn sortInternal(self: Self, a: usize, b: usize, ctx: anytype, comptime mode: std.sort.Mode) void {
const sort_context: struct {
sub_ctx: @TypeOf(ctx),
slice: Slice,