Compare commits

...

2 Commits

Author SHA1 Message Date
655988b689 tsk-49: Version bump
Some checks failed
Release Tagging / release (pull_request) Failing after 31s
Rust Build / Check (pull_request) Successful in 40s
Rust Build / Rustfmt (pull_request) Successful in 29s
Rust Build / Test Suite (pull_request) Successful in 33s
Rust Build / Clippy (pull_request) Successful in 39s
Rust Build / build (pull_request) Successful in 25s
2025-11-06 10:47:00 -05:00
9aa2b1d75d tsk-49: Code formatting 2025-11-06 10:46:24 -05:00
3 changed files with 8 additions and 5 deletions

2
Cargo.lock generated
View File

@@ -104,7 +104,7 @@ dependencies = [
[[package]]
name = "icarus_meta"
version = "0.4.3"
version = "0.4.4"
dependencies = [
"imghdr",
"infer",

View File

@@ -1,6 +1,6 @@
[package]
name = "icarus_meta"
version = "0.4.3"
version = "0.4.4"
edition = "2024"
rust-version = "1.90"

View File

@@ -7,7 +7,6 @@ pub struct FileType {
pub file_type: String,
}
/// Initializes a FileType given a filetype passed.
pub fn init_filetype(filetype: &str) -> Result<FileType, std::io::Error> {
if filetype == song::constants::FLAC_TYPE {
@@ -20,12 +19,16 @@ pub fn init_filetype(filetype: &str) -> Result<FileType, std::io::Error> {
mime: String::from(coverart::constants::mime::PNG),
file_type: String::from(coverart::constants::PNG_TYPE),
})
} else if filetype == coverart::constants::JPEG_TYPE || filetype == coverart::constants::JPG_TYPE {
} else if filetype == coverart::constants::JPEG_TYPE
|| filetype == coverart::constants::JPG_TYPE
{
Ok(FileType {
mime: String::from(coverart::constants::mime::JPEG),
file_type: String::from(coverart::constants::JPEG_TYPE),
})
} else {
Err(std::io::Error::other(format!("Unsupported FileType: {filetype:?}")))
Err(std::io::Error::other(format!(
"Unsupported FileType: {filetype:?}"
)))
}
}