zed: Reduce clones (#30550)
A collection of small patches that reduce clones. Mostly by using owned iterators where possible. Release Notes: - N/A
This commit is contained in:
parent
f0f0a52793
commit
8000151aa9
8 changed files with 22 additions and 23 deletions
|
@ -4278,9 +4278,9 @@ impl Repository {
|
|||
}));
|
||||
}
|
||||
let mut cursor = prev_statuses.cursor::<PathProgress>(&());
|
||||
for path in changed_paths.iter() {
|
||||
for path in changed_paths.into_iter() {
|
||||
if cursor.seek_forward(&PathTarget::Path(&path), Bias::Left, &()) {
|
||||
changed_path_statuses.push(Edit::Remove(PathKey(path.0.clone())));
|
||||
changed_path_statuses.push(Edit::Remove(PathKey(path.0)));
|
||||
}
|
||||
}
|
||||
changed_path_statuses
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue