create_dir_all(&source_dir).expect("Could not create source test directory");
create_dir_all(&output_dir).expect("Could not create output test directory");
create_test_file(&source_dir.join("image.png"), "A fish playing the banjo");
- let strategy = Strategy {};
let file = File {
path: source_dir.join("image.png"),
file_type: FileType::File,
};
- strategy.handle(&source_dir, &output_dir, &file);
+ Strategy::handle(&source_dir, &output_dir, &file);
let copied_path = &output_dir.join("image.png");
assert!(copied_path.exists());
&source_dir.join("nested/style.css"),
"* { margin: 0; padding: 0 }",
);
- let strategy = Strategy {};
let file = File {
path: source_dir.join("nested/style.css"),
file_type: FileType::File,
};
- strategy.handle(&source_dir, &output_dir, &file);
+ Strategy::handle(&source_dir, &output_dir, &file);
let copied_path = output_dir.join("nested/style.css");
assert!(copied_path.exists());
let test_dir = setup_test_dir();
let dir_name = test_dir.file_name().unwrap().to_string_lossy();
let parent = test_dir.parent().unwrap();
- let html_dir = parent.join(format!("{}_html", dir_name));
- let gemini_dir = parent.join(format!("{}_gemini", dir_name));
+ let html_dir = parent.join(format!("{dir_name}_html"));
+ let gemini_dir = parent.join(format!("{dir_name}_gemini"));
let _cleanup = TestDir {
paths: vec![test_dir.clone(), html_dir.clone(), gemini_dir.clone()],
let test_dir = setup_test_dir();
let dir_name = test_dir.file_name().unwrap().to_string_lossy();
let parent = test_dir.parent().unwrap();
- let html_dir = parent.join(format!("{}_html", dir_name));
- let gemini_dir = parent.join(format!("{}_gemini", dir_name));
+ let html_dir = parent.join(format!("{dir_name}_html"));
+ let gemini_dir = parent.join(format!("{dir_name}_gemini"));
let _cleanup = TestDir {
paths: vec![test_dir.clone(), html_dir.clone(), gemini_dir.clone()],