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:
@@ -306,8 +306,7 @@ impl PickerDelegate for BranchListDelegate {
|
||||
cx.background_executor().clone(),
|
||||
)
|
||||
.await
|
||||
.iter()
|
||||
.cloned()
|
||||
.into_iter()
|
||||
.map(|candidate| BranchEntry {
|
||||
branch: all_branches[candidate.candidate_id].clone(),
|
||||
positions: candidate.positions,
|
||||
|
||||
@@ -1051,8 +1051,8 @@ impl GitPanel {
|
||||
repo.checkout_files(
|
||||
"HEAD",
|
||||
entries
|
||||
.iter()
|
||||
.map(|entries| entries.repo_path.clone())
|
||||
.into_iter()
|
||||
.map(|entries| entries.repo_path)
|
||||
.collect(),
|
||||
cx,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user