From 767f0d91f41d66fd7248c333377f3027ed789b04 Mon Sep 17 00:00:00 2001 From: SteveLauC Date: Mon, 6 May 2024 20:37:55 +0800 Subject: [PATCH] refactor: 2 clippy warnings (#789) --- src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index abbf8cd1..447c6d49 100644 --- a/src/config.rs +++ b/src/config.rs @@ -488,7 +488,7 @@ impl ConfigFile { for path in possible_config_paths.iter() { if path.exists() { debug!("Configuration at {}", path.display()); - res.0 = path.clone(); + res.0.clone_from(path); break; } } @@ -497,7 +497,7 @@ impl ConfigFile { // If no config file exists, create a default one in the config directory if !res.0.exists() && res.1.is_empty() { - res.0 = possible_config_paths[0].clone(); + res.0.clone_from(&possible_config_paths[0]); debug!("No configuration exists"); write(&res.0, EXAMPLE_CONFIG).map_err(|e| { debug!(