Use a WeakViewHandle in Client for view message handlers

This commit is contained in:
Antonio Scandurra
2023-04-26 12:21:02 +02:00
parent 57beec6071
commit 689e878bd8
3 changed files with 32 additions and 19 deletions
+3 -3
View File
@@ -2219,7 +2219,7 @@ impl Workspace {
// RPC handlers
async fn handle_follow(
this: ViewHandle<Self>,
this: WeakViewHandle<Self>,
envelope: TypedEnvelope<proto::Follow>,
_: Arc<Client>,
mut cx: AsyncAppContext,
@@ -2267,7 +2267,7 @@ impl Workspace {
}
async fn handle_unfollow(
this: ViewHandle<Self>,
this: WeakViewHandle<Self>,
envelope: TypedEnvelope<proto::Unfollow>,
_: Arc<Client>,
mut cx: AsyncAppContext,
@@ -2282,7 +2282,7 @@ impl Workspace {
}
async fn handle_update_followers(
this: ViewHandle<Self>,
this: WeakViewHandle<Self>,
envelope: TypedEnvelope<proto::UpdateFollowers>,
_: Arc<Client>,
cx: AsyncAppContext,