From 2c6283fce91f53a59b6242798e2a5d0bc4a08576 Mon Sep 17 00:00:00 2001 From: Adam Eury Date: Mon, 2 Sep 2024 16:39:07 -0400 Subject: [PATCH] Update test --- src/files.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/files.rs b/src/files.rs index 7be37a0..a9f3495 100644 --- a/src/files.rs +++ b/src/files.rs @@ -73,6 +73,7 @@ impl Iterator for FileIter { #[cfg(test)] mod test { + use std::path::PathBuf; use super::{from_path, File}; #[test] @@ -120,10 +121,10 @@ mod test { #[test] fn from_path_returns_iterator_over_files_in_the_given_path() { let want = vec![ - File::new("./testdata/en/hello.txt", 6), - File::new("./testdata/en/world.txt", 7), - File::new("./testdata/es/hola.txt", 5), - File::new("./testdata/es/mundo.txt", 6), + File::new(PathBuf::from("./testdata/en/hello.txt"), 6), + File::new(PathBuf::from("./testdata/en/world.txt"), 7), + File::new(PathBuf::from("./testdata/es/hola.txt"), 5), + File::new(PathBuf::from("./testdata/es/mundo.txt"), 6), ]; let mut got = from_path("./testdata").unwrap().collect::>(); // Sort by path for consistent ordering.