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