gpui: Don't impl IntoElement on () (#8555)

Although it's kinda cute, rust makes it too easy to accidentally return
() from a function.

/cc @nathansobo

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-02-28 15:19:05 -07:00 committed by GitHub
parent 9e4b3ce94c
commit 014e6f66bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 18 additions and 14 deletions

View file

@ -12,7 +12,7 @@ pub fn derive_render(input: TokenStream) -> TokenStream {
#where_clause
{
fn render(&mut self, _cx: &mut gpui::ViewContext<Self>) -> impl gpui::Element {
()
gpui::Empty
}
}
};