| ... | ... | @@ -300,10 +300,8 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type |
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | pub fn set(it: &Iterator, index: usize) void { |
| 303 | | if (index < prealloc_item_count) { |
| 304 | | it.index = index; |
| 305 | | return; |
| 306 | | } |
| 303 | it.index = index; |
| 304 | if (index < prealloc_item_count) return; |
| 307 | 305 | it.shelf_index = shelfIndex(index); |
| 308 | 306 | it.box_index = boxIndex(index, it.shelf_index); |
| 309 | 307 | it.shelf_size = shelfSize(it.shelf_index); |