Checkpoint: Compiling

This commit is contained in:
Marshall Bowers 2023-10-26 10:08:39 +02:00
parent 8b972f6d8e
commit 9fb9885931
50 changed files with 139 additions and 146 deletions

View file

@ -36,7 +36,7 @@ impl<S: 'static + Send + Sync> Toast<S> {
}
}
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {
let theme = theme(cx);
let mut div = div();
@ -61,8 +61,8 @@ impl<S: 'static + Send + Sync> Toast<S> {
}
}
impl<S: 'static + Send + Sync> ParentElement for Toast<S> {
fn children_mut(&mut self) -> &mut SmallVec<[AnyElement<Self::ViewState>; 2]> {
impl<S: 'static + Send + Sync> ParentElement<S> for Toast<S> {
fn children_mut(&mut self) -> &mut SmallVec<[AnyElement<S>; 2]> {
&mut self.children
}
}
@ -90,11 +90,7 @@ mod stories {
}
}
fn render(
&mut self,
_view: &mut S,
cx: &mut ViewContext<S>,
) -> impl Element<ViewState = S> {
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {
Story::container(cx)
.child(Story::title_for::<_, Toast<S>>(cx))
.child(Story::label(cx, "Default"))