diff --git a/zed/src/worktree.rs b/zed/src/worktree.rs index af1b5e4321..eaa6c56e97 100644 --- a/zed/src/worktree.rs +++ b/zed/src/worktree.rs @@ -1748,20 +1748,19 @@ impl File { Worktree::Local(worktree) => worktree.rpc.clone(), Worktree::Remote(worktree) => Some((worktree.rpc.clone(), worktree.remote_id)), } { - cx.background() - .spawn(async move { - if let Err(error) = rpc - .send(proto::UpdateBuffer { - worktree_id: remote_id, - buffer_id, - operations: Some(operation).iter().map(Into::into).collect(), - }) - .await - { - log::error!("error sending buffer operation: {}", error); - } - }) - .detach(); + cx.spawn(|_, _| async move { + if let Err(error) = rpc + .send(proto::UpdateBuffer { + worktree_id: remote_id, + buffer_id, + operations: Some(operation).iter().map(Into::into).collect(), + }) + .await + { + log::error!("error sending buffer operation: {}", error); + } + }) + .detach(); } }); }