]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/os.rs
std: Rename Show/String to Debug/Display
[rust.git] / src / libstd / os.rs
index fc0c838a3f11800418dce248a4c98c951be7f81c..985a8cd32e29d88c478f6f5920d42fdd9fe2fb8f 100644 (file)
@@ -37,7 +37,7 @@
 use fmt;
 use io::{IoResult, IoError};
 use iter::{Iterator, IteratorExt};
-use marker::Copy;
+use marker::{Copy, Send};
 use libc::{c_void, c_int, c_char};
 use libc;
 use boxed::Box;
@@ -855,7 +855,7 @@ pub enum MapOption {
 impl Copy for MapOption {}
 
 /// Possible errors when creating a map.
-#[derive(Copy)]
+#[derive(Copy, Show)]
 pub enum MapError {
     /// # The following are POSIX-specific
     ///
@@ -900,7 +900,8 @@ pub enum MapError {
     ErrMapViewOfFile(uint)
 }
 
-impl fmt::Show for MapError {
+#[stable]
+impl fmt::Display for MapError {
     fn fmt(&self, out: &mut fmt::Formatter) -> fmt::Result {
         let str = match *self {
             ErrFdNotAvail => "fd not available for reading or writing",
@@ -934,13 +935,6 @@ fn fmt(&self, out: &mut fmt::Formatter) -> fmt::Result {
 
 impl Error for MapError {
     fn description(&self) -> &str { "memory map error" }
-    fn detail(&self) -> Option<String> { Some(format!("{:?}", self)) }
-}
-
-impl FromError<MapError> for Box<Error> {
-    fn from_error(err: MapError) -> Box<Error> {
-        box err
-    }
 }
 
 // Round up `from` to be divisible by `to`