Remove IntoAnyElement bound from Element trait

This commit is contained in:
Nathan Sobo 2023-10-26 11:49:36 +02:00
parent db15db45ce
commit 927278e20d
48 changed files with 106 additions and 224 deletions

View file

@ -16,7 +16,7 @@ impl<S: 'static + Send + Sync + Clone> CopilotModal<S> {
}
}
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {
div().id(self.id.clone()).child(
Modal::new("some-id")
.title("Connect Copilot to Zed")
@ -47,11 +47,7 @@ mod stories {
}
}
fn render(
&mut self,
_view: &mut S,
cx: &mut ViewContext<S>,
) -> impl Element<S> {
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {
Story::container(cx)
.child(Story::title_for::<_, CopilotModal<S>>(cx))
.child(Story::label(cx, "Default"))