X-Git-Url: https://git.r.bdr.sh/rbdr/page/blobdiff_plain/b03284133baa6339fe4adf48e4a6499ef3ac287b..36a5c232b1f5d86bf97e29af987862732556ee07:/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); } }