From 2be26804470ac02383cc7be8f4cfcc746a7466cb Mon Sep 17 00:00:00 2001 From: phoenix Date: Fri, 24 Oct 2025 12:12:11 -0400 Subject: [PATCH] tsk-79: Code cleanup --- src/coverart.rs | 1 - src/song.rs | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/coverart.rs b/src/coverart.rs index caad5a4..0d50feb 100644 --- a/src/coverart.rs +++ b/src/coverart.rs @@ -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)] diff --git a/src/song.rs b/src/song.rs index af0f209..5d5f35d 100644 --- a/src/song.rs +++ b/src/song.rs @@ -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) }