Remove boxed error from CustomError.
This commit is contained in:
parent
f65d0bb82d
commit
05c64f53b1
@ -10,7 +10,6 @@ pub enum CustomError {
|
|||||||
Text(String),
|
Text(String),
|
||||||
Static(&'static str),
|
Static(&'static str),
|
||||||
IO(std::io::Error),
|
IO(std::io::Error),
|
||||||
BoxedError(Box<dyn std::error::Error>),
|
|
||||||
Parser(ErrorKind),
|
Parser(ErrorKind),
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,9 +35,3 @@ impl From<&'static str> for CustomError {
|
|||||||
CustomError::Static(value)
|
CustomError::Static(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<Box<dyn std::error::Error>> for CustomError {
|
|
||||||
fn from(value: Box<dyn std::error::Error>) -> Self {
|
|
||||||
CustomError::BoxedError(value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user