1
0
Fork 0
mirror of https://git.sr.ht/~nixgoat/vento synced 2025-11-29 16:15:43 +00:00

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.
This commit is contained in:
Lux Aliaga 2022-10-23 12:54:23 -03:00
parent 839d4dcc76
commit 5f5ae6e41e
Signed by: lux
GPG key ID: B56C805968637437
2 changed files with 6 additions and 6 deletions

View file

@ -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(),
};

View file

@ -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(),
};