std.sort: add pdqsort and heapsort
This commit is contained in:
committed by
Andrew Kelley
parent
bfe02ff61a
commit
3db3cf7790
@@ -23,7 +23,7 @@ pub fn main() !void {
|
||||
while (try it.next()) |entry| {
|
||||
try names.append(try allocator.dupe(u8, entry.name));
|
||||
}
|
||||
std.sort.sort([]const u8, names.items, {}, (struct {
|
||||
std.mem.sort([]const u8, names.items, {}, (struct {
|
||||
fn lessThan(_: void, a: []const u8, b: []const u8) bool {
|
||||
return std.mem.lessThan(u8, a, b);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user