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;
impl Copy for MapOption {}
/// Possible errors when creating a map.
-#[derive(Copy)]
+#[derive(Copy, Show)]
pub enum MapError {
/// # The following are POSIX-specific
///
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",
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`