diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-03-30 14:23:22 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-03-30 14:23:22 -0400 |
| commit | 9e7ae062492d4b41564832d37408336e36165e67 (patch) | |
| tree | b6b898deb26a63f264ee43e00ecfe883a1e8db99 /tools/process_headers.zig | |
| parent | b980568c810fda4c014da42be8e5108b4cbadb7c (diff) | |
| download | zig-9e7ae062492d4b41564832d37408336e36165e67.tar.gz zig-9e7ae062492d4b41564832d37408336e36165e67.zip | |
std lib API deprecations for the upcoming 0.6.0 release
See #3811
Diffstat (limited to 'tools/process_headers.zig')
| -rw-r--r-- | tools/process_headers.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/process_headers.zig b/tools/process_headers.zig index 7c9befcffa..65c5701106 100644 --- a/tools/process_headers.zig +++ b/tools/process_headers.zig @@ -324,7 +324,7 @@ pub fn main() !void { }, .os = .linux, }; - search: for (search_paths.toSliceConst()) |search_path| { + search: for (search_paths.span()) |search_path| { var sub_path: []const []const u8 = undefined; switch (vendor) { .musl => { @@ -414,13 +414,13 @@ pub fn main() !void { try contents_list.append(contents); } } - std.sort.sort(*Contents, contents_list.toSlice(), Contents.hitCountLessThan); + std.sort.sort(*Contents, contents_list.span(), Contents.hitCountLessThan); var best_contents = contents_list.popOrNull().?; if (best_contents.hit_count > 1) { // worth it to make it generic const full_path = try std.fs.path.join(allocator, &[_][]const u8{ out_dir, generic_name, path_kv.key }); try std.fs.cwd().makePath(std.fs.path.dirname(full_path).?); - try std.io.writeFile(full_path, best_contents.bytes); + try std.fs.cwd().writeFile(full_path, best_contents.bytes); best_contents.is_generic = true; while (contents_list.popOrNull()) |contender| { if (contender.hit_count > 1) { @@ -447,7 +447,7 @@ pub fn main() !void { }); const full_path = try std.fs.path.join(allocator, &[_][]const u8{ out_dir, out_subpath, path_kv.key }); try std.fs.cwd().makePath(std.fs.path.dirname(full_path).?); - try std.io.writeFile(full_path, contents.bytes); + try std.fs.cwd().writeFile(full_path, contents.bytes); } } } |
