| ... | ... | @@ -242,9 +242,9 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type { |
| 242 | 242 | /// Grows list if `len < new_items.len`. |
| 243 | 243 | /// Shrinks list if `len > new_items.len`. |
| 244 | 244 | /// Invalidates element pointers if this ArrayList is resized. |
| 245 | | /// Asserts that the start index is in bounds or equal to the length. |
| 245 | /// Asserts that the range is in bounds. |
| 246 | 246 | pub fn replaceRange(self: *Self, start: usize, len: usize, new_items: []const T) Allocator.Error!void { |
| 247 | | const after_range = try addOrOom(start, len); |
| 247 | const after_range = start + len; |
| 248 | 248 | const range = self.items[start..after_range]; |
| 249 | 249 | |
| 250 | 250 | if (range.len == new_items.len) |
| ... | ... | @@ -257,7 +257,7 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type { |
| 257 | 257 | try self.insertSlice(after_range, rest); |
| 258 | 258 | } else { |
| 259 | 259 | @memcpy(range[0..new_items.len], new_items); |
| 260 | | const after_subrange = try addOrOom(start, new_items.len); |
| 260 | const after_subrange = start + new_items.len; |
| 261 | 261 | |
| 262 | 262 | for (self.items[after_range..], 0..) |item, i| { |
| 263 | 263 | self.items[after_subrange..][i] = item; |