From bba33ecd8685e2ecb83d40abd9682d7dc2536382 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Sun, 10 Jul 2016 15:37:41 -0700 Subject: [PATCH] Derive Debug on FileType. Partially fixes #32054 --- src/libstd/fs.rs | 2 +- src/libstd/sys/unix/fs.rs | 2 +- src/libstd/sys/windows/fs.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 668fa1fb30360..83439b3f13215 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -141,7 +141,7 @@ pub struct Permissions(fs_imp::FilePermissions); /// An structure representing a type of file with accessors for each file type. #[stable(feature = "file_type", since = "1.1.0")] -#[derive(Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)] pub struct FileType(fs_imp::FileType); /// A builder used to create directories in various manners. diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index 0524851df91ab..a004ff7afe1ec 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -84,7 +84,7 @@ pub struct OpenOptions { #[derive(Clone, PartialEq, Eq, Debug)] pub struct FilePermissions { mode: mode_t } -#[derive(Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)] pub struct FileType { mode: mode_t } pub struct DirBuilder { mode: mode_t } diff --git a/src/libstd/sys/windows/fs.rs b/src/libstd/sys/windows/fs.rs index c243e890526f7..5eb1cc547e489 100644 --- a/src/libstd/sys/windows/fs.rs +++ b/src/libstd/sys/windows/fs.rs @@ -38,7 +38,7 @@ pub struct FileAttr { reparse_tag: c::DWORD, } -#[derive(Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)] pub enum FileType { Dir, File, SymlinkFile, SymlinkDir, ReparsePoint, MountPoint, }