mirror of
https://github.com/instant-labs/instant-distance.git
synced 2025-02-02 22:12:12 +00:00
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
Block a user