refactor: remove voiding of return values when calling functions

+ properly handle errors for individual files

SUGGESTIONS BY AI
This commit is contained in:
2026-09-01 11:20:33 +02:00
parent df4aeb5b65
commit 9f15f4cbd6
2 changed files with 9 additions and 5 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ use glob::glob;
use lofty::prelude::ItemKey;
use lofty::tag::Accessor;
use lofty::tag::Tag;
use std::fs::{copy, create_dir_all, rename};
use std::fs::{copy, create_dir_all, remove_dir, rename};
use std::path::PathBuf;
pub fn move_files(
@@ -32,7 +32,7 @@ pub fn move_files(
};
let dir_to_create = target_dir.join(artist_dir).join(album_dir.as_ref());
let _ = create_dir_all(dir_to_create);
create_dir_all(&dir_to_create)?;
let target = target_dir.join(artist_dir).join(album_dir.as_ref());
let file_name = PathBuf::from(format!(