tsk-83: Add None value for MusicTypes and CoverArtTypes (#87)
All checks were successful
Release Tagging / release (push) Successful in 33s
Rust Build / Check (push) Successful in 34s
Rust Build / Test Suite (push) Successful in 32s
Rust Build / Rustfmt (push) Successful in 32s
Rust Build / Clippy (push) Successful in 32s
Rust Build / build (push) Successful in 32s

Closes #83

Reviewed-on: #87
Co-authored-by: phoenix <kundeng00@pm.me>
Co-committed-by: phoenix <kundeng00@pm.me>
This commit was merged in pull request #87.
This commit is contained in:
2025-10-28 17:05:13 +00:00
committed by phoenix
parent 0a27b8ccb1
commit 432078e3c2
6 changed files with 42 additions and 20 deletions

View File

@@ -107,12 +107,21 @@ mod song_tests {
};
assert_eq!(song.directory.is_empty(), false);
song_cpy.filename = song::generate_filename(types::MusicTypes::FlacExtension, true);
match song::generate_filename(types::MusicTypes::FlacExtension, true) {
Ok(filename) => {
song_cpy.filename = filename;
}
Err(err) => {
assert!(false, "Error generatig filename: {err:?}");
}
};
println!("Directory: {:?}", song_cpy.directory);
println!("File to be created: {:?}", song_cpy.filename);
match song::io::copy_song(&song, &mut song_cpy) {
Ok(_) => {}
Ok(_) => {
println!("Song copied");
}
Err(err) => {
assert!(false, "Error copying song: Error: {err:?}")
}