Changed types
This commit is contained in:
10
src/song.rs
10
src/song.rs
@@ -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 filename_len = 10;
|
||||
|
||||
let file_extension = match typ {
|
||||
types::types::Types::DefaultMusicExtension => {
|
||||
types::Types::DefaultMusicExtension => {
|
||||
String::from(constants::DEFAULTMUSICEXTENSION)
|
||||
}
|
||||
|
||||
types::types::Types::WavExtension => String::from(constants::WAVEXTENSION),
|
||||
types::types::Types::FlacExtension => String::from(constants::FLACEXTENSION),
|
||||
types::types::Types::MPThreeExtension => String::from(constants::MPTHREEEXTENSION),
|
||||
types::Types::WavExtension => String::from(constants::WAVEXTENSION),
|
||||
types::Types::FlacExtension => String::from(constants::FLACEXTENSION),
|
||||
types::Types::MPThreeExtension => String::from(constants::MPTHREEEXTENSION),
|
||||
};
|
||||
|
||||
if randomize {
|
||||
|
@@ -1,8 +1,6 @@
|
||||
pub mod types {
|
||||
pub enum Types {
|
||||
DefaultMusicExtension,
|
||||
WavExtension,
|
||||
FlacExtension,
|
||||
MPThreeExtension,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user