Remove pointless copying.
All checks were successful
format Build format has succeeded
rust-test Build rust-test has succeeded
clippy Build clippy has succeeded

This commit is contained in:
Tom Alexander
2024-10-19 17:28:50 -04:00
parent 1c3e2ca4d9
commit 884a28e63a
2 changed files with 4 additions and 5 deletions

View File

@@ -125,10 +125,10 @@ async fn read_file(path: PathBuf) -> std::io::Result<(PathBuf, String)> {
Ok((path, contents))
}
pub(crate) async fn get_org_files<P: AsRef<Path>>(
pub(crate) async fn get_org_files<P: Into<PathBuf>>(
root_dir: P,
) -> Result<impl Iterator<Item = JoinHandle<std::io::Result<(PathBuf, String)>>>, CustomError> {
let org_files = walk_fs(root_dir.as_ref(), filter_to_org_files).await?;
let org_files = walk_fs(root_dir, filter_to_org_files).await?;
let org_files = org_files
.into_iter()
.map(|entry| entry.path())