| author | |
| committer | |
| log | b403ca0aabb4529949b48e68f1392afc31098a98 |
| tree | 1fbea8012d0700a86bdffdb042dd2f72854029dc |
| parent | 809e7aa4fc0e613752f8c7a4319ac4157089ea84 |
2 files changed, 5 insertions(+), 5 deletions(-)
lib/std/Build.zig+1-3| ... | ... | @@ -971,9 +971,7 @@ pub fn addWriteFiles(b: *Build) *Step.WriteFile { |
| 971 | 971 | } |
| 972 | 972 | |
| 973 | 973 | pub fn addRemoveDirTree(self: *Build, dir_path: []const u8) *Step.RemoveDir { |
| 974 | const remove_dir_step = self.allocator.create(Step.RemoveDir) catch @panic("OOM"); | |
| 975 | remove_dir_step.* = Step.RemoveDir.init(self, dir_path); | |
| 976 | return remove_dir_step; | |
| 974 | return Step.RemoveDir.create(self, dir_path); | |
| 977 | 975 | } |
| 978 | 976 | |
| 979 | 977 | pub fn addFmt(b: *Build, options: Step.Fmt.Options) *Step.Fmt { |
lib/std/Build/Step/RemoveDir.zig+4-2| ... | ... | @@ -8,8 +8,9 @@ pub const base_id = .remove_dir; |
| 8 | 8 | step: Step, |
| 9 | 9 | dir_path: []const u8, |
| 10 | 10 | |
| 11 | pub fn init(owner: *std.Build, dir_path: []const u8) RemoveDir { | |
| 12 | return RemoveDir{ | |
| 11 | pub fn create(owner: *std.Build, dir_path: []const u8) *RemoveDir { | |
| 12 | const self = owner.allocator.create(RemoveDir) catch @panic("OOM"); | |
| 13 | self.* = .{ | |
| 13 | 14 | .step = Step.init(.{ |
| 14 | 15 | .id = .remove_dir, |
| 15 | 16 | .name = owner.fmt("RemoveDir {s}", .{dir_path}), |
| ... | ... | @@ -18,6 +19,7 @@ pub fn init(owner: *std.Build, dir_path: []const u8) RemoveDir { |
| 18 | 19 | }), |
| 19 | 20 | .dir_path = owner.dupePath(dir_path), |
| 20 | 21 | }; |
| 22 | return self; | |
| 21 | 23 | } |
| 22 | 24 | |
| 23 | 25 | fn make(step: *Step, prog_node: *std.Progress.Node) !void { |