mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-26 12:21:50 +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<()> {
|
) -> anyhow::Result<()> {
|
||||||
let message = envelope.payload;
|
let message = envelope.payload;
|
||||||
let mut state = rpc.state.lock().await;
|
let mut state = rpc.state.lock().await;
|
||||||
match state.shared_worktree(message.worktree_id, cx) {
|
let worktree = state.shared_worktree(message.worktree_id, cx)?;
|
||||||
Ok(worktree) => {
|
worktree.update(cx, |tree, cx| tree.update_buffer(message, cx))?;
|
||||||
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),
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue