Remove unneeded anonymous lifetimes from gpui::Context (#27686)

This PR removes a number of unneeded anonymous lifetimes from usages of
`gpui::Context`.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers
2025-03-28 19:26:30 +00:00
committed by GitHub
parent e90411efa2
commit b5dc09c0ca
32 changed files with 80 additions and 87 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ impl BlinkManager {
}
}
pub fn show_cursor(&mut self, cx: &mut Context<'_, BlinkManager>) {
pub fn show_cursor(&mut self, cx: &mut Context<BlinkManager>) {
if !self.visible {
self.visible = true;
cx.notify();
+5 -5
View File
@@ -13983,7 +13983,7 @@ impl Editor {
&mut self,
_: &ToggleInlineDiagnostics,
window: &mut Window,
cx: &mut Context<'_, Editor>,
cx: &mut Context<Editor>,
) {
self.show_inline_diagnostics = !self.show_inline_diagnostics;
self.refresh_inline_diagnostics(false, window, cx);
@@ -14852,7 +14852,7 @@ impl Editor {
fn save_buffers_for_ranges_if_needed(
&mut self,
ranges: &[Range<Anchor>],
cx: &mut Context<'_, Editor>,
cx: &mut Context<Editor>,
) -> Task<Result<()>> {
let multibuffer = self.buffer.read(cx);
let snapshot = multibuffer.read(cx);
@@ -14981,7 +14981,7 @@ impl Editor {
fn toggle_diff_hunks_in_ranges(
&mut self,
ranges: Vec<Range<Anchor>>,
cx: &mut Context<'_, Editor>,
cx: &mut Context<Editor>,
) {
self.buffer.update(cx, |buffer, cx| {
let expand = !buffer.has_expanded_diff_hunks_in_ranges(&ranges, cx);
@@ -18889,7 +18889,7 @@ impl Focusable for Editor {
}
impl Render for Editor {
fn render(&mut self, _: &mut Window, cx: &mut Context<'_, Self>) -> impl IntoElement {
fn render(&mut self, _: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let settings = ThemeSettings::get_global(cx);
let mut text_style = match self.mode {
@@ -19882,7 +19882,7 @@ fn all_edits_insertions_or_deletions(
struct MissingEditPredictionKeybindingTooltip;
impl Render for MissingEditPredictionKeybindingTooltip {
fn render(&mut self, window: &mut Window, cx: &mut Context<'_, Self>) -> impl IntoElement {
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
ui::tooltip_container(window, cx, |container, _, cx| {
container
.flex_shrink_0()
+1 -1
View File
@@ -774,7 +774,7 @@ fn determine_query_ranges(
excerpt_id: ExcerptId,
excerpt_buffer: &Entity<Buffer>,
excerpt_visible_range: Range<usize>,
cx: &mut Context<'_, MultiBuffer>,
cx: &mut Context<MultiBuffer>,
) -> Option<QueryRanges> {
let buffer = excerpt_buffer.read(cx);
let full_excerpt_range = multi_buffer