From 0d6125fc5e272462df1bebadd7f7ab5007f87f88 Mon Sep 17 00:00:00 2001 From: Igor Petruk Date: Sun, 8 Jan 2023 16:59:21 +0000 Subject: [PATCH] Fix clippy warnings --- src/templates.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/templates.rs b/src/templates.rs index 467a682..820ffe3 100644 --- a/src/templates.rs +++ b/src/templates.rs @@ -102,7 +102,7 @@ fn get_custom_templates() -> Result { for template_file in dir_iter { let template_file = template_file?; let name = filename_to_template_name(template_file.path())?; - let filename = path_to_file_name(&template_file.path())?; + let filename = path_to_file_name(template_file.path())?; let contents = std::fs::read_to_string(template_file.path())?; templates.insert( name, @@ -245,7 +245,7 @@ pub fn command_template_import(path: &Path) -> Result<()> { // Not that copy was successful. if let Some(old_file) = old_file_to_remove { let path = filename_to_template_path(old_file)?; - std::fs::remove_file(&path) + std::fs::remove_file(path) .context("Failed to remove old template, template directory may be insonsistent!")?; } Ok(())