about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorIvan Petkov <ivanppetkov@gmail.com>2014-12-26 11:07:24 -0800
committerIvan Petkov <ivanppetkov@gmail.com>2014-12-26 11:07:24 -0800
commit3358e64b8e0a435d428f5303729b8563890abccd (patch)
treea60a1be688c7926f4c32edd21022a33238845d6d /src
parentbd3cf4c05fdec03ab22df27f33191f4851e18cc9 (diff)
Derive Clone, PartialEq, and Eq for std::io::{FileAccess, FileMode}
* Both enums already derived `Copy`, but storing them in any
  struct/container would prevent implementing `Clone` for said
  struct/container even though they should be clonable.
* Also add PartialEq and Eq for good measure.
Diffstat (limited to 'src')
-rw-r--r--src/libstd/io/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index 233ad781093..31eddb42dfc 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -1682,7 +1682,7 @@ pub fn standard_error(kind: IoErrorKind) -> IoError {
 /// A mode specifies how a file should be opened or created. These modes are
 /// passed to `File::open_mode` and are used to control where the file is
 /// positioned when it is initially opened.
-#[deriving(Copy)]
+#[deriving(Copy, Clone, PartialEq, Eq)]
 pub enum FileMode {
     /// Opens a file positioned at the beginning.
     Open,
@@ -1694,7 +1694,7 @@ pub enum FileMode {
 
 /// Access permissions with which the file should be opened. `File`s
 /// opened with `Read` will return an error if written to.
-#[deriving(Copy)]
+#[deriving(Copy, Clone, PartialEq, Eq)]
 pub enum FileAccess {
     /// Read-only access, requests to write will result in an error
     Read,