File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -481,18 +481,17 @@ fn getSortedErrorNames(comptime T: type) []const []const u8 {
481
481
const error_set = @typeInfo (T ).ErrorSet orelse @compileError ("Cannot serialize anyerror" );
482
482
483
483
var sorted_names : [error_set .len ][]const u8 = undefined ;
484
- var sorted_names_slice = & sorted_names ;
485
484
for (error_set , 0.. ) | err , i | {
486
485
sorted_names [i ] = err .name ;
487
486
}
488
487
489
- std .sort .sort ([]const u8 , sorted_names_slice , {}, struct {
488
+ std .sort .sort ([]const u8 , & sorted_names , {}, struct {
490
489
fn order (ctx : void , lhs : []const u8 , rhs : []const u8 ) bool {
491
490
_ = ctx ;
492
491
return (std .mem .order (u8 , lhs , rhs ) == .lt );
493
492
}
494
493
}.order );
495
- return sorted_names_slice ;
494
+ return & sorted_names ;
496
495
}
497
496
}
498
497
You can’t perform that action at this time.
0 commit comments