Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Don't show backtraces in prompts (#12699)

Conrad Irwin1ad8d6ab1ce5
diff --git a/crates/call/src/room.rs b/crates/call/src/room.rs
index 61fb6940244..287e4a125b1 100644
--- a/crates/call/src/room.rs
+++ b/crates/call/src/room.rs
@@ -267,7 +267,7 @@ impl Room {
.await
{
Ok(()) => Ok(room),
- Err(error) => Err(anyhow!("room creation failed: {:?}", error)),
+ Err(error) => Err(error.context("room creation failed")),
}
})
}
diff --git a/crates/workspace/src/notifications.rs b/crates/workspace/src/notifications.rs
index 325b75542f0..49cd2b67674 100644
--- a/crates/workspace/src/notifications.rs
+++ b/crates/workspace/src/notifications.rs
@@ -551,8 +551,7 @@ where
if let Err(err) = self.await {
log::error!("{err:?}");
if let Ok(prompt) = cx.update(|cx| {
- let detail = f(&err, cx)
- .unwrap_or_else(|| format!("{err:?}. Please try again.", err = err));
+ let detail = f(&err, cx).unwrap_or_else(|| format!("{err}. Please try again."));
cx.prompt(PromptLevel::Critical, &msg, Some(&detail), &["Ok"])
}) {
prompt.await.ok();