]> git.r.bdr.sh - rbdr/page/blobdiff - src/file_handler/file_strategies/file.rs
Address pedantic issues
[rbdr/page] / src / file_handler / file_strategies / file.rs
index c3c3016f9b1be9227a41b25c991ffa7d253454a3..e5573a26f43d4e1a9cab3b8cfc60556afc4fa762 100644 (file)
@@ -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);
     }
 }