Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::io;
- #[derive(Debug)]
- pub enum IoError {
- AddressNotFound,
- AddressesOverlapError,
- IoPluginNotFoundError,
- TooManyFilesError,
- Parse(io::Error),
- }
- impl PartialEq for IoError {
- fn eq(&self, rhs: &IoError) -> bool {
- match self {
- IoError::AddressNotFound => if let IoError::AddressNotFound = rhs { true } else { false },
- IoError::AddressesOverlapError => if let IoError::AddressesOverlapError = rhs { true } else { false },
- IoError::IoPluginNotFoundError => if let IoError::IoPluginNotFoundError = rhs { true } else { false },
- IoError::TooManyFilesError => if let IoError::TooManyFilesError = rhs { true } else { false },
- IoError::Parse(_) => if let IoError::Parse(_) = rhs { true } else { false },
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement