1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use std::fmt;
use std::io;
use std::result;
pub type Result<T> = result::Result<T, Disasm6502Error>;
#[derive(Debug)]
pub enum Disasm6502Error {
Io(io::Error)
}
impl fmt::Display for Disasm6502Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
Disasm6502Error::Io(ref err) => err.fmt(f)
}
}
}
impl From<io::Error> for Disasm6502Error {
fn from(err: io::Error) -> Disasm6502Error {
Disasm6502Error::Io(err)
}
}