mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 21:32:40 +00:00
Avoid logging errors in RPC message handlers
The `on_message` helper already logs when an error occurs.
This commit is contained in:
parent
8e5e354bd8
commit
ab089b6575
1 changed files with 2 additions and 10 deletions
|
@ -2002,16 +2002,8 @@ mod remote {
|
|||
) -> anyhow::Result<()> {
|
||||
let message = envelope.payload;
|
||||
let mut state = rpc.state.lock().await;
|
||||
match state.shared_worktree(message.worktree_id, cx) {
|
||||
Ok(worktree) => {
|
||||
if let Err(error) = worktree.update(cx, |tree, cx| tree.update_buffer(message, cx))
|
||||
{
|
||||
log::error!("error applying operations to buffer: {}", error);
|
||||
}
|
||||
}
|
||||
Err(error) => log::error!("{}", error),
|
||||
}
|
||||
|
||||
let worktree = state.shared_worktree(message.worktree_id, cx)?;
|
||||
worktree.update(cx, |tree, cx| tree.update_buffer(message, cx))?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue