Remove IntoAnyElement bound from Element trait
This commit is contained in:
parent
db15db45ce
commit
927278e20d
48 changed files with 106 additions and 224 deletions
|
@ -158,7 +158,7 @@ impl<S: 'static + Send + Sync + Clone> Buffer<S> {
|
|||
self
|
||||
}
|
||||
|
||||
fn render_row(row: BufferRow, cx: &WindowContext) -> impl Element<S> {
|
||||
fn render_row(row: BufferRow, cx: &WindowContext) -> impl IntoAnyElement<S> {
|
||||
let theme = theme(cx);
|
||||
|
||||
let line_background = if row.current {
|
||||
|
@ -208,7 +208,7 @@ impl<S: 'static + Send + Sync + Clone> Buffer<S> {
|
|||
}))
|
||||
}
|
||||
|
||||
fn render_rows(&self, cx: &WindowContext) -> Vec<impl Element<S>> {
|
||||
fn render_rows(&self, cx: &WindowContext) -> Vec<impl IntoAnyElement<S>> {
|
||||
match &self.rows {
|
||||
Some(rows) => rows
|
||||
.rows
|
||||
|
@ -219,7 +219,7 @@ impl<S: 'static + Send + Sync + Clone> Buffer<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> {
|
||||
let theme = theme(cx);
|
||||
let rows = self.render_rows(cx);
|
||||
|
||||
|
@ -258,11 +258,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> {
|
||||
let theme = theme(cx);
|
||||
|
||||
Story::container(cx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue