From 5404259896215a91cacd20571f64b98adf0fefb3 Mon Sep 17 00:00:00 2001 From: Kiril Kovachev Date: Thu, 8 May 2025 01:13:03 +0100 Subject: [PATCH] refactor: use CONFIG_TEMPLATE_PATH constant in error message instead of hard-coding --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index c9297dc..6335e8f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,7 +47,7 @@ fn setup(args: SetupArgs) -> Result<(), std::io::Error> { std::fs::write(shellexpand::tilde(BOT_CONFIG_PATH).into_owned(), filled_in_config).unwrap(); Ok(()) } else { - Err(std::io::Error::new(std::io::ErrorKind::NotFound, "Unable to find mwbot_template.toml; did you execute the script from the same directory?")) + Err(std::io::Error::new(std::io::ErrorKind::NotFound, format!("Unable to find {}; did you execute the script from the same directory?", CONFIG_TEMPLATE_PATH))) } }