svg_preview: Remove unnecessary dependency on editor (#43147)

Editor is a choke point in our compilation graph while also being a very
common crate that is being edited. So reducing things that depend on it
will generally improve compilation times for us.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Lukas Wirth
2025-11-20 12:18:50 +01:00
committed by GitHub
parent 1e45c99c80
commit 29f9853978
24 changed files with 127 additions and 119 deletions
+3 -3
View File
@@ -1203,7 +1203,7 @@ impl Pane {
pub fn items_of_type<T: Render>(&self) -> impl '_ + Iterator<Item = Entity<T>> {
self.items
.iter()
.filter_map(|item| item.to_any().downcast().ok())
.filter_map(|item| item.to_any_view().downcast().ok())
}
pub fn active_item(&self) -> Option<Box<dyn ItemHandle>> {
@@ -3869,7 +3869,7 @@ impl Render for Pane {
.size_full()
.overflow_hidden()
.child(self.toolbar.clone())
.child(item.to_any())
.child(item.to_any_view())
} else {
let placeholder = div
.id("pane_placeholder")
@@ -6957,7 +6957,7 @@ mod tests {
.enumerate()
.map(|(ix, item)| {
let mut state = item
.to_any()
.to_any_view()
.downcast::<TestItem>()
.unwrap()
.read(cx)