use std::path::PathBuf;
-use crate::file_handler::{FileType, FileHandlerStrategy};
+use crate::file_handler::{File, FileType, FileHandlerStrategy};
impl FileHandlerStrategy for Strategy {
fn is(&self, path: &PathBuf) -> bool {
FileType::Layout
}
- fn can_handle(&self, path: &PathBuf) -> bool {
- self.is(path)
+ fn can_handle(&self, file_type: &FileType) -> bool {
+ match file_type {
+ FileType::Layout => true,
+ _ => false,
+ }
}
- fn handle(&self, path: &PathBuf) {
- println!("Should convert {}", path.display())
- }
+ fn handle(&self, _file: &File) {}
}
-