From 3fd05f81a3f6375d16cb7531e6aff1df9d1a1d96 Mon Sep 17 00:00:00 2001 From: Amy OpenClaw Date: Tue, 14 Jul 2026 04:20:13 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Remove=20useless=20borrows=20in?= =?UTF-8?q?=20formatting=20macros?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commands/new_folder.rs | 4 ++-- src/files/create.rs | 8 ++++---- src/plugins/gdarquie_work/work.rs | 2 +- src/projects/initialize.rs | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/commands/new_folder.rs b/src/commands/new_folder.rs index 2709540..199e757 100644 --- a/src/commands/new_folder.rs +++ b/src/commands/new_folder.rs @@ -15,7 +15,7 @@ pub fn new_folder() -> std::io::Result { println!("✅ Folder has been created successfully!"); // create a the config { "created_at": "2025-12-31T23:59:59Z", "type": "day" } - let config_file_path = format!("{}{}", &new_folder_path, ".not-config.json"); + let config_file_path = format!("{}{}", new_folder_path, ".not-config.json"); match File::create(&config_file_path) { Ok(_file) => { @@ -28,7 +28,7 @@ pub fn new_folder() -> std::io::Result { }; // create the default file in the folder - let default_file_path = format!("{}{}", &new_folder_path, "not.md"); + let default_file_path = format!("{}{}", new_folder_path, "not.md"); match File::create(&default_file_path) { Ok(_file) => { diff --git a/src/files/create.rs b/src/files/create.rs index a1d8663..859a5e8 100644 --- a/src/files/create.rs +++ b/src/files/create.rs @@ -31,7 +31,7 @@ pub fn create_file(title: Option) -> std::io::Result { None => name(), }; - let full_not_file_path = format!("{}{}", ¬_file_path, not_file_name); + let full_not_file_path = format!("{}{}", not_file_path, not_file_name); // create folders if needed if let Err(e) = create_dir_all(¬_file_path) { @@ -85,14 +85,14 @@ pub fn create_note_file_with_folders(note_type: String) -> std::io::Result = Local::now(); let today_file_name = get_day_as_string(now); let today_file_path = format!( "{}{}{}{}{}", - &today_folder_path, today_file_name, ".", note_type, ".md" + today_folder_path, today_file_name, ".", note_type, ".md" ); // only create if not does not already exists @@ -111,7 +111,7 @@ pub fn create_note_file_with_folders(note_type: String) -> std::io::Result String { stats_content.push_str(&format!( "| {} | {} | {:.2} | {:.2} |\n", - &weekday, &work_stat.day, hours, cumulative_week_hours + weekday, work_stat.day, hours, cumulative_week_hours )); } } diff --git a/src/projects/initialize.rs b/src/projects/initialize.rs index 5d0f12f..32d2b8f 100644 --- a/src/projects/initialize.rs +++ b/src/projects/initialize.rs @@ -9,7 +9,7 @@ pub fn get_project_config_path() -> String { eprintln!("NOT_PATH environment variable not set."); std::process::exit(1); }); - format!("{}/{}/", ¬_path, ".nost") + format!("{}/{}/", not_path, ".nost") } /** @@ -22,10 +22,10 @@ pub fn is_project_initialized() -> bool { std::process::exit(1); }); - let project_config_path = format!("{}/.nost/project.json", ¬_path,); + let project_config_path = format!("{}/.nost/project.json", not_path); log::debug!( "Checking if configuration exists at path: {}", - &project_config_path + project_config_path ); Path::new(&project_config_path).is_file() } @@ -54,9 +54,9 @@ pub fn initialize_project() -> Result> { create_dir_all(&configuration_path)?; // create en empty configuration file - let default_config_path = format!("{}{}", &configuration_path, "project.json"); + let default_config_path = format!("{}{}", configuration_path, "project.json"); let config_file = std::fs::File::create(&default_config_path)?; - log::debug!("Configuration initialized at path: {}", &configuration_path); + log::debug!("Configuration initialized at path: {}", configuration_path); // append inital content to the configuration file const NOST_VERSION: &str = env!("CARGO_PKG_VERSION");