tsk-79: Code cleanup

This commit is contained in:
2025-10-24 12:12:11 -04:00
parent ecf128ee91
commit 2be2680447
2 changed files with 1 additions and 4 deletions

View File

@@ -3,7 +3,6 @@ use std::io::Write;
use rand::Rng;
use serde::{Deserialize, Serialize};
const FILENAME_LENGTH: i32 = 16;
#[derive(Clone, Debug, Default, Deserialize, Serialize, utoipa::ToSchema)]

View File

@@ -129,14 +129,12 @@ impl Song {
}
}
/// Generates a filename. In order to save a song to the filesystem, the song must have
/// a directory and filename
/// Generates a filename. In order to save a song to the filesystem
pub fn generate_filename(typ: types::MusicTypes, randomize: bool) -> String {
let file_extension = match typ {
types::MusicTypes::DefaultMusicExtension => {
String::from(constants::file_extensions::audio::DEFAULTMUSICEXTENSION)
}
types::MusicTypes::WavExtension => {
String::from(constants::file_extensions::audio::WAVEXTENSION)
}