| author | |
| committer | |
| log | 7f2466e65fe0b7411792ce3d3f186893ed22379d |
| tree | 1f2b8a6b80901dc07618129a4a1cb31a8e399fb5 |
| parent | 9c3324173de2d8de80e95fb6be23eb63dfbc5169 |
2 files changed, 6 insertions(+), 1 deletions(-)
lib/std/bounded_array.zig+5| ... | ... | @@ -72,6 +72,11 @@ pub fn BoundedArrayAligned( |
| 72 | 72 | self.len = @intCast(len); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | /// Remove all elements from the slice. | |
| 76 | pub fn clear(self: *Self) void { | |
| 77 | self.len = 0; | |
| 78 | } | |
| 79 | ||
| 75 | 80 | /// Copy the content of an existing slice. |
| 76 | 81 | pub fn fromSlice(m: []const T) error{Overflow}!Self { |
| 77 | 82 | var list = try init(m.len); |
src/Compilation.zig+1-1| ... | ... | @@ -2264,7 +2264,7 @@ pub fn update(comp: *Compilation, main_progress_node: std.Progress.Node) !void { |
| 2264 | 2264 | } |
| 2265 | 2265 | } |
| 2266 | 2266 | |
| 2267 | zcu.analysis_roots.resize(0) catch unreachable; | |
| 2267 | zcu.analysis_roots.clear(); | |
| 2268 | 2268 | |
| 2269 | 2269 | try comp.queueJob(.{ .analyze_mod = std_mod }); |
| 2270 | 2270 | zcu.analysis_roots.appendAssumeCapacity(std_mod); |