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:04:03 -06:00
parent 03619dfa55
commit fe492eacbf
93 changed files with 661 additions and 656 deletions

View file

@ -50,7 +50,7 @@ impl View for ActiveBufferLanguage {
"ActiveBufferLanguage"
}
fn render(&mut self, cx: &mut ViewContext<Self>) -> Element<Self> {
fn render(&mut self, cx: &mut ViewContext<Self>) -> AnyElement<Self> {
if let Some(active_language) = self.active_language.as_ref() {
let active_language_text = if let Some(active_language_text) = active_language {
active_language_text.to_string()
@ -69,9 +69,9 @@ impl View for ActiveBufferLanguage {
.on_click(MouseButton::Left, |_, _, cx| {
cx.dispatch_action(crate::Toggle)
})
.into_element()
.into_any()
} else {
Empty::new().into_element()
Empty::new().into_any()
}
}
}

View file

@ -182,7 +182,7 @@ impl PickerDelegate for LanguageSelectorDelegate {
mouse_state: &mut MouseState,
selected: bool,
cx: &AppContext,
) -> Element<Picker<Self>> {
) -> AnyElement<Picker<Self>> {
let settings = cx.global::<Settings>();
let theme = &settings.theme;
let mat = &self.matches[ix];
@ -197,6 +197,6 @@ impl PickerDelegate for LanguageSelectorDelegate {
.with_highlights(mat.positions.clone())
.contained()
.with_style(style.container)
.into_element()
.into_any()
}
}