diff --git a/src/song.rs b/src/song.rs index 3546ae7..de158ab 100644 --- a/src/song.rs +++ b/src/song.rs @@ -152,16 +152,18 @@ impl Song { } } - pub fn generate_filename(&self, typ: types::Types, randomize: bool) -> String { + pub fn generate_filename(&self, typ: types::MusicTypes, randomize: bool) -> String { let mut filename: String = String::new(); let filename_len = 10; let file_extension = match typ { - types::Types::DefaultMusicExtension => String::from(constants::DEFAULTMUSICEXTENSION), + types::MusicTypes::DefaultMusicExtension => { + String::from(constants::DEFAULTMUSICEXTENSION) + } - types::Types::WavExtension => String::from(constants::WAVEXTENSION), - types::Types::FlacExtension => String::from(constants::FLACEXTENSION), - types::Types::MPThreeExtension => String::from(constants::MPTHREEEXTENSION), + types::MusicTypes::WavExtension => String::from(constants::WAVEXTENSION), + types::MusicTypes::FlacExtension => String::from(constants::FLACEXTENSION), + types::MusicTypes::MPThreeExtension => String::from(constants::MPTHREEEXTENSION), }; if randomize { diff --git a/src/types.rs b/src/types.rs index d8892dc..e518320 100644 --- a/src/types.rs +++ b/src/types.rs @@ -1,5 +1,4 @@ - -pub enum Types { +pub enum MusicTypes { DefaultMusicExtension, WavExtension, FlacExtension,