From 2221441a4c40ce5f4117d92d34f986d93a71a66b Mon Sep 17 00:00:00 2001 From: k-nasa Date: Sat, 18 Jan 2020 08:36:54 +0900 Subject: [PATCH] feat: Implement Clone trait for DirEntry --- src/fs/dir_entry.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fs/dir_entry.rs b/src/fs/dir_entry.rs index 527fab42e..e1622eec6 100644 --- a/src/fs/dir_entry.rs +++ b/src/fs/dir_entry.rs @@ -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;