convert to path instead of cloning in batch exec

update changelog
This commit is contained in:
Jonathan Goren
2021-12-11 15:43:53 +02:00
parent 3dc61b5f28
commit 22dbed0545
3 changed files with 25 additions and 12 deletions
+7
View File
@@ -37,6 +37,13 @@ impl DirEntry {
}
}
pub fn into_path(self) -> PathBuf {
match self.inner {
DirEntryInner::Normal(e) => e.into_path(),
DirEntryInner::BrokenSymlink(p) => p,
}
}
pub fn file_type(&self) -> Option<FileType> {
match &self.inner {
DirEntryInner::Normal(e) => e.file_type(),