diff --git a/src/detection/song.rs b/src/detection/song.rs index e031aea..7382495 100644 --- a/src/detection/song.rs +++ b/src/detection/song.rs @@ -27,15 +27,13 @@ pub fn file_type_from_data(data: &Vec) -> Result { - Err(std::io::Error::other("File type not determined")) - } + None => Err(std::io::Error::other("File type not determined")), } } @@ -57,7 +55,11 @@ mod tests { match super::file_type_from_filepath(&filepath) { Ok(filetype) => { - assert_eq!(filetype.file_type, crate::detection::song::constants::FLAC_TYPE, "Types do not match") + assert_eq!( + filetype.file_type, + crate::detection::song::constants::FLAC_TYPE, + "Types do not match" + ) } Err(err) => { assert!(false, "Error: {err:?}") @@ -74,12 +76,15 @@ mod tests { match super::file_type_from_data(&data) { Ok(filetype) => { - assert_eq!(filetype.file_type, crate::detection::song::constants::FLAC_TYPE, "Types do not match") + assert_eq!( + filetype.file_type, + crate::detection::song::constants::FLAC_TYPE, + "Types do not match" + ) } Err(err) => { assert!(false, "Error: {err:?}") } } } - }