Merge pull request #682 from k-nasa/impl_clone_for_dir_entry

Implement Clone trait for DirEntry
This commit is contained in:
Yoshua Wuyts 2020-01-27 13:10:20 +01:00 committed by GitHub
commit 57f9fb7e93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -158,6 +158,12 @@ impl fmt::Debug for DirEntry {
} }
} }
impl Clone for DirEntry {
fn clone(&self) -> Self {
DirEntry(self.0.clone())
}
}
cfg_unix! { cfg_unix! {
use crate::os::unix::fs::DirEntryExt; use crate::os::unix::fs::DirEntryExt;