Change model to downcast with ownership

This commit is contained in:
Mikayla committed 2023-10-30 18:00:37 -07:00
1 parent c9e77d2918
commit f9657a8660
1 file changed
+1 -1
+1 -1
View File
@@ -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(),