- Commit
- 3116ac7b547da0d41b0898c4f542c961e0e04ab6
- Parent
- 9a6ecf01d9100b4b48d8bed3fbf7ff2c8b7b8a5c
- Author
- Pablo <pablo-escobar@riseup.net>
- Date
Minor tweak
Followed Clippy's recommendation to replace PathBuf with Path in a section of code
Yet another static page generator for photo galleries
Minor tweak
Followed Clippy's recommendation to replace PathBuf with Path in a section of code
1 file changed, 2 insertions, 2 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | src/picture.rs | 4 | 2 | 2 |
diff --git a/src/picture.rs b/src/picture.rs @@ -6,7 +6,7 @@ use serde::{ }; use std::fs::{self, File}; use std::io::{self, Write}; -use std::path::PathBuf; +use std::path::{PathBuf, Path}; use std::process::exit; /// WebP image quality @@ -25,7 +25,7 @@ pub struct Picture { } impl Picture { - pub fn render_thumbnail(&self, target_dir: &PathBuf) -> io::Result<()> { + pub fn render_thumbnail(&self, target_dir: &Path) -> io::Result<()> { let thumb_path = target_dir.join(self.file_name.clone() + ".webp"); // Only try to render thumbnail in case the thumbnail file in the machine