gpui: Remove unneeded anonymous lifetime from Render::render (#27684)

This PR removes an unneeded anonymous lifetime from the `cx` parameter
to `Render::render`.

This makes it so the anonymous lifetime doesn't show up when
implementing the `Render` trait via a code action:

#### Before

```rs
struct Foo;

impl Render for Foo {
    fn render(&mut self, window: &mut Window, cx: &mut Context<'_, Self>) -> impl IntoElement {
        todo!()
    }
}
```

#### After

```rs
struct Foo;

impl Render for Foo {
    fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
        todo!()
    }
}
```

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-03-28 15:19:20 -04:00 committed by GitHub
parent fcadcbb510
commit e90411efa2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,7 +118,7 @@ impl<T: IntoElement> FluentBuilder for T {}
/// other entities. Views are `Entity`'s which `impl Render` and drawn to the screen.
pub trait Render: 'static + Sized {
/// Render this view into an element tree.
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;
}
impl Render for Empty {