From f9657a86605df34cf92c8cd35af873571f7cde5b Mon Sep 17 00:00:00 2001 From: Mikayla Date: Mon, 30 Oct 2023 18:00:37 -0700 Subject: [PATCH] Change model to downcast with ownership --- crates/gpui2/src/app/entity_map.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui2/src/app/entity_map.rs b/crates/gpui2/src/app/entity_map.rs index 7b1bc0d000..840b0831cd 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(&self) -> Option> { + pub fn downcast(self) -> Option> { if TypeId::of::() == self.entity_type { Some(Model { any_model: self.clone(),