Change model to downcast with ownership

This commit is contained in:
Mikayla
2023-10-30 18:00:37 -07:00
parent 327a2f9967
commit 6f1197e00c
+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(),