| ... | @@ -8,8 +8,9 @@ pub const base_id = .remove_dir; | ... | @@ -8,8 +8,9 @@ pub const base_id = .remove_dir; |
| 8 | step: Step, | 8 | step: Step, |
| 9 | dir_path: []const u8, | 9 | dir_path: []const u8, |
| 10 | | 10 | |
| 11 | pub fn init(owner: *std.Build, dir_path: []const u8) RemoveDir { | 11 | pub fn create(owner: *std.Build, dir_path: []const u8) *RemoveDir { |
| 12 | return RemoveDir{ | 12 | const self = owner.allocator.create(RemoveDir) catch @panic("OOM"); |
| | 13 | self.* = .{ |
| 13 | .step = Step.init(.{ | 14 | .step = Step.init(.{ |
| 14 | .id = .remove_dir, | 15 | .id = .remove_dir, |
| 15 | .name = owner.fmt("RemoveDir {s}", .{dir_path}), | 16 | .name = owner.fmt("RemoveDir {s}", .{dir_path}), |
| ... | @@ -18,6 +19,7 @@ pub fn init(owner: *std.Build, dir_path: []const u8) RemoveDir { | ... | @@ -18,6 +19,7 @@ pub fn init(owner: *std.Build, dir_path: []const u8) RemoveDir { |
| 18 | }), | 19 | }), |
| 19 | .dir_path = owner.dupePath(dir_path), | 20 | .dir_path = owner.dupePath(dir_path), |
| 20 | }; | 21 | }; |
| | 22 | return self; |
| 21 | } | 23 | } |
| 22 | | 24 | |
| 23 | fn make(step: *Step, prog_node: *std.Progress.Node) !void { | 25 | fn make(step: *Step, prog_node: *std.Progress.Node) !void { |