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 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 {
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
pub mod types {
|
|
||||||
pub enum Types {
|
pub enum Types {
|
||||||
DefaultMusicExtension,
|
DefaultMusicExtension,
|
||||||
WavExtension,
|
WavExtension,
|
||||||
FlacExtension,
|
FlacExtension,
|
||||||
MPThreeExtension,
|
MPThreeExtension,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user