Use into_any instead of weird 'as' hack
This commit is contained in:
parent
27258a0889
commit
71cf6ec5ae
1 changed files with 4 additions and 4 deletions
|
@ -457,10 +457,10 @@ impl Client {
|
|||
cx: &mut ViewContext<T>,
|
||||
) -> Subscription {
|
||||
let id = (TypeId::of::<T>(), remote_id);
|
||||
self.state.write().entities_by_type_and_remote_id.insert(
|
||||
id,
|
||||
WeakSubscriber::View((&cx.weak_handle() as &AnyWeakViewHandle).clone()),
|
||||
);
|
||||
self.state
|
||||
.write()
|
||||
.entities_by_type_and_remote_id
|
||||
.insert(id, WeakSubscriber::View(cx.weak_handle().into_any()));
|
||||
Subscription::Entity {
|
||||
client: Arc::downgrade(self),
|
||||
id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue