Revert "Fix missing first element in index."

Incorrect diagnosis, this is not the cause of the issue mentionned.

It does though introduce a possible empty cells, which violates
assumptions.

Revert and comment.

This reverts commit b784e2fed0.
This commit is contained in:
2019-10-15 18:36:36 +02:00
parent b784e2fed0
commit 411a6222a1

View File

@@ -63,14 +63,15 @@ where
for coordinate in distinct {
//trace!("{:?} {:?} {:?} {:?}", dimension, coordinate, cell, count);
cells[cell].push(coordinate);
count += 1;
// Check first, otherwise we might add a cell which will stay empty.
if count == max_offset {
count = 0;
cell += 1;
cells.push(Vec::with_capacity(max_offset));
}
cells[cell].push(coordinate);
count += 1;
}
info!(