main::save_page_img: Take a Path, not PathBuf

This commit is contained in:
nicoo 2022-02-13 18:34:54 +01:00
parent cf3c01fef8
commit f7d6f861b5

View File

@ -180,7 +180,7 @@ fn save_to_file<P: AsRef<Path>, T: Serialize, F: Formatter>(
pub async fn save_page_img(
page: &freefall::Page,
bytes: Bytes,
target_dir: &PathBuf,
target_dir: &Path,
) -> Result<PathBuf, anyhow::Error> {
if !page.img_url.ends_with("png") {
return Err(anyhow!(