From 5f5ae6e41eb4335231a94ab5bcc3580ecd7b18c1 Mon Sep 17 00:00:00 2001 From: Lux Aliaga Date: Sun, 23 Oct 2022 12:54:23 -0300 Subject: [PATCH] src: Removed redundant clones These suggestions were made by cargo clippy. These clones were previously there to remove compiler messages, but it seems like they're not needed anymore. --- src/inv.rs | 4 ++-- src/item.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/inv.rs b/src/inv.rs index 701d82d..ae7aa7f 100644 --- a/src/inv.rs +++ b/src/inv.rs @@ -58,8 +58,8 @@ pub fn list(slot: &str, dir: &str) -> Result<()> { } let mut slotdir: PathBuf = match slot { - "active" | "a" => common::env_config()?.active_dir.clone(), - "inactive" | "i" => common::env_config()?.inactive_dir.clone(), + "active" | "a" => common::env_config()?.active_dir, + "inactive" | "i" => common::env_config()?.inactive_dir, _ => PathBuf::new(), }; diff --git a/src/item.rs b/src/item.rs index 12b3205..a0536d6 100644 --- a/src/item.rs +++ b/src/item.rs @@ -36,8 +36,8 @@ pub fn take(file: &String, slot: &str) -> Result<()> { ); }; let slotdir: PathBuf = match slot { - "active" | "a" => common::env_config()?.active_dir.clone(), - "inactive" | "i" => common::env_config()?.inactive_dir.clone(), + "active" | "a" => common::env_config()?.active_dir, + "inactive" | "i" => common::env_config()?.inactive_dir, _ => PathBuf::new(), }; @@ -102,8 +102,8 @@ pub fn drop(file: &String, slot: &str, dest: PathBuf) -> Result<()> { }; let slotdir: PathBuf = match slot { - "active" | "a" => common::env_config()?.active_dir.clone(), - "inactive" | "i" => common::env_config()?.inactive_dir.clone(), + "active" | "a" => common::env_config()?.active_dir, + "inactive" | "i" => common::env_config()?.inactive_dir, _ => PathBuf::new(), };