Change model to downcast with ownership

Mikayla created

Change summary

crates/gpui2/src/app/entity_map.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

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(),