Changes
Some checks failed
Rust Build / Check (pull_request) Successful in 25s
Rust Build / Test Suite (pull_request) Failing after 26s
Rust Build / Rustfmt (pull_request) Successful in 25s
Rust Build / Clippy (pull_request) Successful in 26s
Rust Build / build (pull_request) Successful in 26s

This commit is contained in:
2025-03-22 16:47:56 -04:00
parent 80ca1177a4
commit 46922b671d

View File

@@ -1,7 +1,6 @@
mod utils { mod utils {
use std::fs; use std::fs;
use std::fs::File; use std::io::Read;
use std::io::{Read, Write};
use std::path::Path; use std::path::Path;
pub fn get_tests_directory() -> String { pub fn get_tests_directory() -> String {
@@ -30,7 +29,8 @@ mod utils {
} }
mod song_tests { mod song_tests {
// use std::fs::File; use std::fs::File;
use std::io::Write;
// use std::io::{Read, Write}; // use std::io::{Read, Write};
use tempfile::tempdir; use tempfile::tempdir;
@@ -61,7 +61,7 @@ mod song_tests {
println!("Directory: {}", song.directory); println!("Directory: {}", song.directory);
match song.song_path() { match song.song_path() {
Ok(filepath) => match extract_data_from_file(&filepath) { Ok(filepath) => match utils::extract_data_from_file(&filepath) {
Ok(buffer) => { Ok(buffer) => {
assert_eq!(buffer.is_empty(), false); assert_eq!(buffer.is_empty(), false);
@@ -104,7 +104,7 @@ mod song_tests {
song.filename = String::from("track01.flac"); song.filename = String::from("track01.flac");
match song.song_path() { match song.song_path() {
Ok(songpath) => match extract_data_from_file(&songpath) { Ok(songpath) => match utils::extract_data_from_file(&songpath) {
Ok(buffer) => { Ok(buffer) => {
let mut song_cpy = song.clone(); let mut song_cpy = song.clone();
let temp_dir = tempdir().expect("Failed to create temp dir"); let temp_dir = tempdir().expect("Failed to create temp dir");