From b6a41c8fb2f0b0eccaa8f1696845a1ad9f75b189 Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Mon, 12 Dec 2022 18:40:40 -0800 Subject: [PATCH] feat: implemented test case for iterator Spent an hour trying to use a .iter(), just to realize it was already an iterator --- src/main.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8930335..883384b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,5 @@ use clap::Parser; use dirs_next; -use scan_dir::ScanDir; pub mod file_operations; @@ -48,7 +47,13 @@ fn main() { println!("Music directory is: {:?}", dirs_next::audio_dir()); } - file_operations::scan_music_dir(music_dir).unwrap(); + let music_scanner = file_operations::MusicScanner::new(music_dir); + + for file_batch in music_scanner { + for filepath in file_batch { + println!("{:?}", filepath); + } + } println!("{:?}", cli); }