Use string interpolation (#13482)
Release Notes: - N/A --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
parent
2dee4f87fd
commit
f40d2313fb
3 changed files with 12 additions and 15 deletions
|
@ -56,11 +56,11 @@ use crate::zed::inline_completion_registry;
|
|||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||
|
||||
fn fail_to_launch(e: anyhow::Error) {
|
||||
eprintln!("Zed failed to launch: {:?}", e);
|
||||
eprintln!("Zed failed to launch: {e:?}");
|
||||
App::new().run(move |cx| {
|
||||
if let Ok(window) = cx.open_window(gpui::WindowOptions::default(), |cx| cx.new_view(|_| gpui::Empty)) {
|
||||
window.update(cx, |_, cx| {
|
||||
let response = cx.prompt(gpui::PromptLevel::Critical, "Zed failed to launch", Some(&format!("{}\n\nFor help resolving this, please open an issue on https://github.com/zed-industries/zed", e)), &["Exit"]);
|
||||
let response = cx.prompt(gpui::PromptLevel::Critical, "Zed failed to launch", Some(&format!("{e}\n\nFor help resolving this, please open an issue on https://github.com/zed-industries/zed")), &["Exit"]);
|
||||
|
||||
cx.spawn(|_, mut cx| async move {
|
||||
response.await?;
|
||||
|
@ -80,7 +80,7 @@ fn fail_to_open_window_async(e: anyhow::Error, cx: &mut AsyncAppContext) {
|
|||
}
|
||||
|
||||
fn fail_to_open_window(e: anyhow::Error, _cx: &mut AppContext) {
|
||||
eprintln!("Zed failed to open a window: {:?}", e);
|
||||
eprintln!("Zed failed to open a window: {e:?}");
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
{
|
||||
process::exit(1);
|
||||
|
@ -99,7 +99,7 @@ fn fail_to_open_window(e: anyhow::Error, _cx: &mut AppContext) {
|
|||
.add_notification(
|
||||
notification_id,
|
||||
Notification::new("Zed failed to launch")
|
||||
.body(Some(format!("{:?}", e).as_str()))
|
||||
.body(Some(format!("{e:?}").as_str()))
|
||||
.priority(Priority::High)
|
||||
.icon(ashpd::desktop::Icon::with_names(&[
|
||||
"dialog-question-symbolic",
|
||||
|
@ -751,7 +751,7 @@ fn init_stdout_logger() {
|
|||
)?;
|
||||
write!(buf, "{:<5}", buf.default_styled_level(record.level()))?;
|
||||
if let Some(path) = record.module_path() {
|
||||
write!(buf, " {}", path)?;
|
||||
write!(buf, " {path}")?;
|
||||
}
|
||||
write!(buf, "{}", subtle.value("]"))?;
|
||||
writeln!(buf, " {}", record.args())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue