Take &mut self in View::render
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
co-authored by
Nathan Sobo
parent
917a80ec36
commit
ef89ceae4d
@@ -220,7 +220,7 @@ impl View for ChatPanel {
|
||||
"ChatPanel"
|
||||
}
|
||||
|
||||
fn render(&self, cx: &mut RenderContext<Self>) -> ElementBox {
|
||||
fn render(&mut self, cx: &mut RenderContext<Self>) -> ElementBox {
|
||||
let theme = &self.settings.borrow().theme;
|
||||
Container::new(
|
||||
Flex::column()
|
||||
|
||||
+1
-1
@@ -2522,7 +2522,7 @@ impl Entity for Editor {
|
||||
}
|
||||
|
||||
impl View for Editor {
|
||||
fn render<'a>(&self, _: &mut RenderContext<Self>) -> ElementBox {
|
||||
fn render(&mut self, _: &mut RenderContext<Self>) -> ElementBox {
|
||||
EditorElement::new(self.handle.clone()).boxed()
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ impl View for FileFinder {
|
||||
"FileFinder"
|
||||
}
|
||||
|
||||
fn render(&self, _: &mut RenderContext<Self>) -> ElementBox {
|
||||
fn render(&mut self, _: &mut RenderContext<Self>) -> ElementBox {
|
||||
let settings = self.settings.borrow();
|
||||
|
||||
Align::new(
|
||||
|
||||
@@ -13,7 +13,7 @@ impl View for ProjectBrowser {
|
||||
"ProjectBrowser"
|
||||
}
|
||||
|
||||
fn render(&self, _: &mut gpui::RenderContext<'_, Self>) -> gpui::ElementBox {
|
||||
fn render(&mut self, _: &mut gpui::RenderContext<'_, Self>) -> gpui::ElementBox {
|
||||
Empty::new().boxed()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ impl View for ThemeSelector {
|
||||
"ThemeSelector"
|
||||
}
|
||||
|
||||
fn render(&self, cx: &mut RenderContext<Self>) -> ElementBox {
|
||||
fn render(&mut self, cx: &mut RenderContext<Self>) -> ElementBox {
|
||||
let settings = self.settings.borrow();
|
||||
|
||||
Align::new(
|
||||
|
||||
@@ -944,7 +944,7 @@ impl View for Workspace {
|
||||
"Workspace"
|
||||
}
|
||||
|
||||
fn render(&self, cx: &mut RenderContext<Self>) -> ElementBox {
|
||||
fn render(&mut self, cx: &mut RenderContext<Self>) -> ElementBox {
|
||||
let settings = self.settings.borrow();
|
||||
Container::new(
|
||||
Flex::column()
|
||||
|
||||
@@ -369,7 +369,7 @@ impl View for Pane {
|
||||
"Pane"
|
||||
}
|
||||
|
||||
fn render(&self, cx: &mut RenderContext<Self>) -> ElementBox {
|
||||
fn render(&mut self, cx: &mut RenderContext<Self>) -> ElementBox {
|
||||
if let Some(active_item) = self.active_item() {
|
||||
Flex::column()
|
||||
.with_child(self.render_tabs(cx))
|
||||
|
||||
Reference in New Issue
Block a user