Reduce allocations (#31223)

Release Notes:

- N/A
This commit is contained in:
tidely
2025-05-23 14:25:17 +03:00
committed by GitHub
parent f435304209
commit fbc922ad46
6 changed files with 14 additions and 20 deletions
+2 -2
View File
@@ -306,9 +306,9 @@ impl Inventory {
.unwrap_or((None, None, None));
self.list_tasks(file, language, worktree_id.or(buffer_worktree_id), cx)
.iter()
.into_iter()
.find(|(_, template)| template.label == label)
.map(|val| val.1.clone())
.map(|val| val.1)
}
/// Pulls its task sources relevant to the worktree and the language given,