aboutsummaryrefslogtreecommitdiff
path: root/core/path/filepath
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-10-16 14:55:36 +0100
committergingerBill <bill@gingerbill.org>2020-10-16 14:55:36 +0100
commit41f6a684e188a2f5af6fe4558590f82b9ba5c700 (patch)
tree8dc13f5fe3805dcdc39ad169d2997634a16de7bc /core/path/filepath
parent289908e0b8a42dfe215555245d2291c2aaa41f4f (diff)
Rename `slice.sort_proc` to `slice.sort_by`; add `slice.sort_by_key`
Diffstat (limited to 'core/path/filepath')
-rw-r--r--core/path/filepath/match.odin2
-rw-r--r--core/path/filepath/walk.odin2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/path/filepath/match.odin b/core/path/filepath/match.odin
index 3e94d3fd9..75508c449 100644
--- a/core/path/filepath/match.odin
+++ b/core/path/filepath/match.odin
@@ -284,7 +284,7 @@ _glob :: proc(dir, pattern: string, matches: ^[dynamic]string) -> (m: [dynamic]s
fis, _ := os.read_dir(d, -1);
- slice.sort_proc(fis, proc(a, b: os.File_Info) -> bool {
+ slice.sort_by(fis, proc(a, b: os.File_Info) -> bool {
return a.name < b.name;
});
defer {
diff --git a/core/path/filepath/walk.odin b/core/path/filepath/walk.odin
index 04424b92e..ba198ff0e 100644
--- a/core/path/filepath/walk.odin
+++ b/core/path/filepath/walk.odin
@@ -81,7 +81,7 @@ read_dir :: proc(dir_name: string, allocator := context.temp_allocator) -> ([]os
if err != 0 {
return nil, err;
}
- slice.sort_proc(fis, proc(a, b: os.File_Info) -> bool {
+ slice.sort_by(fis, proc(a, b: os.File_Info) -> bool {
return a.name < b.name;
});
return fis, 0;