tsk-83: Code formatting

This commit is contained in:
2025-10-28 12:52:44 -04:00
parent 0b16ebcf1c
commit 6d5d621f16
2 changed files with 9 additions and 5 deletions

View File

@@ -85,7 +85,10 @@ impl CoverArt {
}
/// Generates filename for a CoverArt
pub fn generate_filename(typ: crate::types::CoverArtTypes, randomize: bool) -> Result<String, std::io::Error> {
pub fn generate_filename(
typ: crate::types::CoverArtTypes,
randomize: bool,
) -> Result<String, std::io::Error> {
let file_extension = match typ {
crate::types::CoverArtTypes::PngExtension => {
String::from(crate::constants::file_extensions::image::PNGEXTENSION)

View File

@@ -126,7 +126,10 @@ impl Song {
}
/// Generates a filename. In order to save a song to the filesystem
pub fn generate_filename(typ: types::MusicTypes, randomize: bool) -> Result<String, std::io::Error> {
pub fn generate_filename(
typ: types::MusicTypes,
randomize: bool,
) -> Result<String, std::io::Error> {
let file_extension = match typ {
types::MusicTypes::DefaultMusicExtension => {
String::from(constants::file_extensions::audio::DEFAULTMUSICEXTENSION)
@@ -140,9 +143,7 @@ pub fn generate_filename(typ: types::MusicTypes, randomize: bool) -> Result<Stri
types::MusicTypes::MPThreeExtension => {
String::from(constants::file_extensions::audio::MPTHREEEXTENSION)
}
types::MusicTypes::None => {
return Err(std::io::Error::other("Unsupported MusicTypes"))
}
types::MusicTypes::None => return Err(std::io::Error::other("Unsupported MusicTypes")),
};
let filename: String = if randomize {