From 8766e4412b95cfa0288683748cc20aba81a64d08 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Sat, 4 Jan 2025 02:20:55 +0100 Subject: Address pedantic issues --- src/file_handler/file_strategies/file.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/file_handler/file_strategies/file.rs') diff --git a/src/file_handler/file_strategies/file.rs b/src/file_handler/file_strategies/file.rs index c3c3016..e5573a2 100644 --- a/src/file_handler/file_strategies/file.rs +++ b/src/file_handler/file_strategies/file.rs @@ -3,10 +3,10 @@ pub struct Strategy {} use std::fs::{copy, create_dir_all}; use std::path::Path; -use crate::file_handler::{File, FileHandlerStrategy, FileType}; +use crate::file_handler::{File, FileType, Strategy as FileHandlerStrategy}; impl Strategy { - fn handle(&self, source: &Path, destination: &Path, file: &File) { + fn handle(source: &Path, destination: &Path, file: &File) { let relative_path = file.path.strip_prefix(source).unwrap(); let complete_destination = destination.join(relative_path); let destination_parent = complete_destination.parent().unwrap(); @@ -29,11 +29,11 @@ impl FileHandlerStrategy for Strategy { } fn handle_html(&self, source: &Path, destination: &Path, file: &File, _l: &str) { - self.handle(source, destination, file) + Strategy::handle(source, destination, file); } fn handle_gemini(&self, source: &Path, destination: &Path, file: &File) { - self.handle(source, destination, file) + Strategy::handle(source, destination, file); } } -- cgit