From 80e28643123cc3de9cc879ecdce77faa32de36a3 Mon Sep 17 00:00:00 2001 From: phoenix Date: Tue, 21 Oct 2025 21:08:57 -0400 Subject: [PATCH] tsk-45: Code formatting --- src/detection/song.rs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) 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:?}") } } } - }