mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Use into_any instead of weird 'as' hack
This commit is contained in:
parent
27258a0889
commit
71cf6ec5ae
@ -457,10 +457,10 @@ impl Client {
|
|||||||
cx: &mut ViewContext<T>,
|
cx: &mut ViewContext<T>,
|
||||||
) -> Subscription {
|
) -> Subscription {
|
||||||
let id = (TypeId::of::<T>(), remote_id);
|
let id = (TypeId::of::<T>(), remote_id);
|
||||||
self.state.write().entities_by_type_and_remote_id.insert(
|
self.state
|
||||||
id,
|
.write()
|
||||||
WeakSubscriber::View((&cx.weak_handle() as &AnyWeakViewHandle).clone()),
|
.entities_by_type_and_remote_id
|
||||||
);
|
.insert(id, WeakSubscriber::View(cx.weak_handle().into_any()));
|
||||||
Subscription::Entity {
|
Subscription::Entity {
|
||||||
client: Arc::downgrade(self),
|
client: Arc::downgrade(self),
|
||||||
id,
|
id,
|
||||||
|
Loading…
Reference in New Issue
Block a user