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 15:26:30 -04:00 committed by GitHub
parent e90411efa2
commit b5dc09c0ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 80 additions and 87 deletions

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()