Slightly simplify search output loop variable

This commit is contained in:
Dirkjan Ochtman 2020-12-16 12:43:51 +01:00
parent ad60d38279
commit e1f6b666c9
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,7 @@ where
}
let found = min(search.nearest.len(), out.len());
for (i, candidate) in search.nearest.iter().take(found).enumerate() {
for (i, candidate) in search.nearest[..found].iter().enumerate() {
out[i] = candidate.pid;
}
found