Cleanups preparing for WindowContext refactor (#22475)

* Remove unnecessary WindowContext and ViewContext '_ lifetimes

* Removed some cases where WindowContext has a different name than `cx`.

Release Notes:

- N/A
This commit is contained in:
Michael Sloan
2024-12-28 21:36:14 +00:00
committed by GitHub
parent 9815358bdd
commit 016b5d60e1
41 changed files with 127 additions and 152 deletions
+2 -2
View File
@@ -253,7 +253,7 @@ impl TabSwitcherDelegate {
fn select_item(
&mut self,
item_id: EntityId,
cx: &mut ViewContext<'_, Picker<TabSwitcherDelegate>>,
cx: &mut ViewContext<Picker<TabSwitcherDelegate>>,
) {
let selected_idx = self
.matches
@@ -263,7 +263,7 @@ impl TabSwitcherDelegate {
self.set_selected_index(selected_idx, cx);
}
fn close_item_at(&mut self, ix: usize, cx: &mut ViewContext<'_, Picker<TabSwitcherDelegate>>) {
fn close_item_at(&mut self, ix: usize, cx: &mut ViewContext<Picker<TabSwitcherDelegate>>) {
let Some(tab_match) = self.matches.get(ix) else {
return;
};