From c5cfacfa1b741d726be691f33d89612ba2a02bad Mon Sep 17 00:00:00 2001 From: Ethan Simmons Date: Mon, 5 Feb 2024 02:01:01 -0600 Subject: [PATCH] Changed to_path_buf to clone to better show what it is doing --- src/fs/dir.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fs/dir.rs b/src/fs/dir.rs index ba51f55..d21807f 100644 --- a/src/fs/dir.rs +++ b/src/fs/dir.rs @@ -43,7 +43,7 @@ impl Directory { let errors: Vec = io_errors.chain(dir_errors).chain(file_errors).collect(); - Ok(Directory{ files, directories, path: path.to_path_buf(), errors }) + Ok(Directory{ files, directories, path: path.clone(), errors }) }