From f3e0db15592d71b8b7125bffbf73df231be8da9d Mon Sep 17 00:00:00 2001 From: nham Date: Wed, 30 Jul 2014 15:53:40 -0400 Subject: Derive PartialOrd, Ord and Hash for bitflags types. In order to prevent users from having to manually implement Hash and Ord for bitflags types, this commit derives these traits automatically. This breaks code that has manually implemented any of these traits for types created by the bitflags! macro. Change this code by removing implementations of these traits. [breaking-change] --- src/libstd/io/mod.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'src/libstd/io') diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 4277b509962..6f57048c613 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -1795,7 +1795,6 @@ pub struct UnstableFileStat { bitflags!( #[doc="A set of permissions for a file or directory is represented by a set of flags which are or'd together."] - #[deriving(Hash)] #[deriving(Show)] flags FilePermission: u32 { static UserRead = 0o400, -- cgit 1.4.1-3-g733a5 From 96d6126f9bae9a9171b150fb9a6e26047229faaa Mon Sep 17 00:00:00 2001 From: nham Date: Wed, 30 Jul 2014 16:05:24 -0400 Subject: Implement Default for std::io::FilePermission --- src/libstd/io/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libstd/io') diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 6f57048c613..f1b92b973c8 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -223,6 +223,7 @@ responding to errors that may occur while attempting to read the numbers. use char::Char; use collections::Collection; +use default::Default; use fmt; use int; use iter::Iterator; @@ -1829,6 +1830,11 @@ on unix-like systems."] } ) +impl Default for FilePermission { + #[inline] + fn default() -> FilePermission { FilePermission::empty() } +} + #[cfg(test)] mod tests { use super::{IoResult, Reader, MemReader, NoProgress, InvalidInput}; -- cgit 1.4.1-3-g733a5