Skip to content

Commit

Permalink
Merge pull request #682 from k-nasa/impl_clone_for_dir_entry
Browse files Browse the repository at this point in the history
Implement Clone trait for DirEntry
  • Loading branch information
yoshuawuyts committed Jan 27, 2020
2 parents 6c1b5eb + 2221441 commit 57f9fb7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/fs/dir_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ impl fmt::Debug for DirEntry {
}
}

impl Clone for DirEntry {
fn clone(&self) -> Self {
DirEntry(self.0.clone())
}
}

cfg_unix! {
use crate::os::unix::fs::DirEntryExt;

Expand Down

0 comments on commit 57f9fb7

Please sign in to comment.