fixed ALT using more landmarks than available
This commit is contained in:
parent
0b3d2db135
commit
cab977451c
1 changed files with 2 additions and 1 deletions
|
|
@ -137,7 +137,8 @@ impl LandmarkBestSet<'_> {
|
||||||
results.reverse();
|
results.reverse();
|
||||||
|
|
||||||
self.best_landmarks.clear();
|
self.best_landmarks.clear();
|
||||||
for result in results[..self.best_size].iter() {
|
|
||||||
|
for result in results[..(self.best_size.min(results.len()))].iter() {
|
||||||
self.best_landmarks.push(result.0);
|
self.best_landmarks.push(result.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue