Avoid reference cycle between Client
and its models
This commit is contained in:
parent
471ecae82c
commit
10a872a370
2 changed files with 24 additions and 8 deletions
|
@ -3567,6 +3567,15 @@ impl AnyWeakModelHandle {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: Entity> From<WeakModelHandle<T>> for AnyWeakModelHandle {
|
||||
fn from(handle: WeakModelHandle<T>) -> Self {
|
||||
AnyWeakModelHandle {
|
||||
model_id: handle.model_id,
|
||||
model_type: TypeId::of::<T>(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct WeakViewHandle<T> {
|
||||
window_id: usize,
|
||||
view_id: usize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue