Add some small test code for tracking down this list bug

This commit is contained in:
Mikayla 2024-01-16 16:52:55 -08:00
parent d00067cd86
commit db433586aa
No known key found for this signature in database
5 changed files with 165 additions and 92 deletions

View file

@ -115,6 +115,12 @@ pub trait Render: 'static + Sized {
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement;
}
impl Render for () {
fn render(&mut self, _cx: &mut ViewContext<Self>) -> impl IntoElement {
()
}
}
/// You can derive [`IntoElement`] on any type that implements this trait.
/// It is used to allow views to be expressed in terms of abstract data.
pub trait RenderOnce: 'static {