Skip to content

Commit 57f9fb7

Browse files
authored
Merge pull request #682 from k-nasa/impl_clone_for_dir_entry
Implement Clone trait for DirEntry
2 parents 6c1b5eb + 2221441 commit 57f9fb7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: src/fs/dir_entry.rs

+6
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ impl fmt::Debug for DirEntry {
158158
}
159159
}
160160

161+
impl Clone for DirEntry {
162+
fn clone(&self) -> Self {
163+
DirEntry(self.0.clone())
164+
}
165+
}
166+
161167
cfg_unix! {
162168
use crate::os::unix::fs::DirEntryExt;
163169

0 commit comments

Comments
 (0)