From 748843576d6ca8d5f396e884d2b40b308362d3e1 Mon Sep 17 00:00:00 2001 From: Integral Date: Mon, 9 Dec 2024 17:14:43 +0800 Subject: [PATCH] refactor: replace format! with concat! for string literals (#261) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- src/config.rs | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 793b915..1d85746 100644 --- a/src/config.rs +++ b/src/config.rs @@ -47,7 +47,7 @@ impl Config { env::var(CONFIG_ENV).ok().map(PathBuf::from), dirs::config_dir().map(|p| p.join(env!("CARGO_PKG_NAME")).join(DEFAULT_CONFIG)), dirs::home_dir().map(|p| { - p.join(format!(".{}", env!("CARGO_PKG_NAME"))) + p.join(concat!(".", env!("CARGO_PKG_NAME"))) .join(DEFAULT_CONFIG) }), ] diff --git a/src/lib.rs b/src/lib.rs index 1ea5c10..10a5fc0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -89,7 +89,7 @@ pub fn run() -> Result<()> { dbus_client.notify( env!("CARGO_PKG_NAME"), "startup", - &format!("{} is up and running 🦡", env!("CARGO_PKG_NAME")), + concat!(env!("CARGO_PKG_NAME"), " is up and running 🦡"), -1, )?; }