Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Change model to downcast with ownership
Mikayla6f1197e00c26
diff --git a/crates/gpui2/src/app/entity_map.rs b/crates/gpui2/src/app/entity_map.rsindex 7b1bc0d0001..840b0831cda 100644--- a/crates/gpui2/src/app/entity_map.rs+++ b/crates/gpui2/src/app/entity_map.rs@@ -172,7 +172,7 @@ impl AnyModel {}}- pub fn downcast<T: 'static>(&self) -> Option<Model<T>> {+ pub fn downcast<T: 'static>(self) -> Option<Model<T>> {if TypeId::of::<T>() == self.entity_type {Some(Model {any_model: self.clone(),