From 54001860cae81d9bbc02f24f31881f53221be21a Mon Sep 17 00:00:00 2001 From: phoenix Date: Tue, 21 Oct 2025 12:09:58 -0400 Subject: [PATCH] tsk-44: Function name change --- src/detection/coverart.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/detection/coverart.rs b/src/detection/coverart.rs index 3a7e91d..e5d86de 100644 --- a/src/detection/coverart.rs +++ b/src/detection/coverart.rs @@ -1,5 +1,5 @@ /// Gets the file type of a CoverArt given it's path -pub fn file_type(filepath: &str) -> Result { +pub fn file_type_from_filepath(filepath: &str) -> Result { match imghdr::from_file(filepath) { Ok(Some(imghdr::Type::Jpeg)) => Ok(String::from("jpeg")), Ok(Some(imghdr::Type::Png)) => Ok(String::from("png")), @@ -27,7 +27,7 @@ mod tests { let filename = String::from("Sample Tracks 3.png"); let filepath = format!("{directory}/{filename}"); - match super::file_type(&filepath) { + match super::file_type_from_filepath(&filepath) { Ok(filetype) => { assert_eq!( filetype, "png",