Just noticed that I forgot to reset the worker to midpoint in the search.
This doesn't actually matter, except in an unfortunate edge case that turns out to never happen.
This commit is contained in:
@@ -108,6 +108,7 @@ fn next_target(low_index: usize, high_index: usize, avoid: &[usize]) -> Option<u
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
worker = midpoint;
|
||||||
while worker <= high_index {
|
while worker <= high_index {
|
||||||
if avoid.contains(&worker) {
|
if avoid.contains(&worker) {
|
||||||
worker += 1;
|
worker += 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user