diff --git a/src/error.rs b/src/error.rs index dc86560..6825500 100644 --- a/src/error.rs +++ b/src/error.rs @@ -12,3 +12,13 @@ pub enum Error { /// Result type where errors are of type [Error](enum@Error). pub type Result = StdResult; + +impl From for IoError { + fn from(value: Error) -> Self { + match value { + Error::IO(err) => err, + // If other error types are added in the future: + // err => IoError::new(std::io::ErrorKind::Other, err), + } + } +}