Refine naming of element-related types and traits

Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
Nathan Sobo
2023-04-21 13:06:37 -06:00
co-authored by Max Brunsfeld
parent 03619dfa55
commit fe492eacbf
93 changed files with 661 additions and 656 deletions
@@ -2,7 +2,7 @@ use gpui::{
elements::{Empty, MouseEventHandler, Svg},
platform::CursorStyle,
platform::MouseButton,
Drawable, Element, Entity, View, ViewContext, ViewHandle, WeakViewHandle,
AnyElement, Element, Entity, View, ViewContext, ViewHandle, WeakViewHandle,
};
use settings::Settings;
@@ -34,11 +34,11 @@ impl View for ToggleDockButton {
"Dock Toggle"
}
fn render(&mut self, cx: &mut gpui::ViewContext<Self>) -> Element<Self> {
fn render(&mut self, cx: &mut gpui::ViewContext<Self>) -> AnyElement<Self> {
let workspace = self.workspace.upgrade(cx);
if workspace.is_none() {
return Empty::new().into_element();
return Empty::new().into_any();
}
let workspace = workspace.unwrap();
@@ -97,7 +97,7 @@ impl View for ToggleDockButton {
cx,
)
}
.into_element()
.into_any()
}
}