Return impl IntoElement from Render::render trait
This commit is contained in:
@@ -9291,7 +9291,7 @@ impl FocusableView for Editor {
|
||||
}
|
||||
|
||||
impl Render for Editor {
|
||||
fn render<'a>(&mut self, cx: &mut ViewContext<'a, Self>) -> impl 'static + Element {
|
||||
fn render<'a>(&mut self, cx: &mut ViewContext<'a, Self>) -> impl IntoElement {
|
||||
let settings = ThemeSettings::get_global(cx);
|
||||
let text_style = match self.mode {
|
||||
EditorMode::SingleLine | EditorMode::AutoHeight { .. } => TextStyle {
|
||||
|
||||
@@ -1193,7 +1193,7 @@ impl CursorPosition {
|
||||
}
|
||||
|
||||
impl Render for CursorPosition {
|
||||
fn render(&mut self, _: &mut ViewContext<Self>) -> impl Element {
|
||||
fn render(&mut self, _: &mut ViewContext<Self>) -> impl IntoElement {
|
||||
div().when_some(self.position, |el, position| {
|
||||
let mut text = format!(
|
||||
"{}{FILE_ROW_COLUMN_DELIMITER}{}",
|
||||
|
||||
Reference in New Issue
Block a user