Fixed some warnings #11

Merged
phoenix merged 13 commits from warning_fixes into devel 2025-03-22 18:24:09 +00:00
2 changed files with 8 additions and 7 deletions
Showing only changes of commit 1a72dd87a3 - Show all commits

View File

@@ -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 {

View File

@@ -1,5 +1,4 @@
pub enum Types {
pub enum MusicTypes {
DefaultMusicExtension,
WavExtension,
FlacExtension,