fix std.SegmentedList.Iterator.set

This commit is contained in:
Andrew Kelley 2018-05-17 00:52:36 -04:00
parent b48d354600
commit 942d384831

View File

@ -300,10 +300,8 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type
}
pub fn set(it: &Iterator, index: usize) void {
if (index < prealloc_item_count) {
it.index = index;
return;
}
it.index = index;
if (index < prealloc_item_count) return;
it.shelf_index = shelfIndex(index);
it.box_index = boxIndex(index, it.shelf_index);
it.shelf_size = shelfSize(it.shelf_index);