Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-petruk committed Jan 8, 2023
1 parent 50c6868 commit 0d6125f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fn get_custom_templates() -> Result<TemplateMap> {
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,
Expand Down Expand Up @@ -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(())
Expand Down

0 comments on commit 0d6125f

Please sign in to comment.