| ... | ... | @@ -926,7 +926,12 @@ pub fn step(self: *Build, name: []const u8, description: []const u8) *Step { |
| 926 | 926 | }), |
| 927 | 927 | .description = self.dupe(description), |
| 928 | 928 | }; |
| 929 | | self.top_level_steps.put(self.allocator, step_info.step.name, step_info) catch @panic("OOM"); |
| 929 | const gop = self.top_level_steps.getOrPut(self.allocator, name) catch @panic("OOM"); |
| 930 | if (gop.found_existing) std.debug.panic("A top-level step with name \"{s}\" already exists", .{name}); |
| 931 | |
| 932 | gop.key_ptr.* = step_info.step.name; |
| 933 | gop.value_ptr.* = step_info; |
| 934 | |
| 930 | 935 | return &step_info.step; |
| 931 | 936 | } |
| 932 | 937 | |