Changed types

This commit is contained in:
2025-03-21 22:12:14 -04:00
parent 928421fe12
commit 0fe70500fa
2 changed files with 5 additions and 7 deletions

View File

@@ -152,18 +152,18 @@ impl Song {
} }
} }
pub fn generate_filename(&self, typ: types::types::Types, randomize: bool) -> String { pub fn generate_filename(&self, typ: types::Types, randomize: bool) -> String {
let mut filename: String = String::new(); let mut filename: String = String::new();
let filename_len = 10; let filename_len = 10;
let file_extension = match typ { let file_extension = match typ {
types::types::Types::DefaultMusicExtension => { types::Types::DefaultMusicExtension => {
String::from(constants::DEFAULTMUSICEXTENSION) String::from(constants::DEFAULTMUSICEXTENSION)
} }
types::types::Types::WavExtension => String::from(constants::WAVEXTENSION), types::Types::WavExtension => String::from(constants::WAVEXTENSION),
types::types::Types::FlacExtension => String::from(constants::FLACEXTENSION), types::Types::FlacExtension => String::from(constants::FLACEXTENSION),
types::types::Types::MPThreeExtension => String::from(constants::MPTHREEEXTENSION), types::Types::MPThreeExtension => String::from(constants::MPTHREEEXTENSION),
}; };
if randomize { if randomize {

View File

@@ -1,8 +1,6 @@
pub mod types {
pub enum Types { pub enum Types {
DefaultMusicExtension, DefaultMusicExtension,
WavExtension, WavExtension,
FlacExtension, FlacExtension,
MPThreeExtension, MPThreeExtension,
} }
}