Slightly simplify search output loop variable
This commit is contained in:
parent
ad60d38279
commit
e1f6b666c9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue