We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3d0ba2d + b292797 commit 3186228Copy full SHA for 3186228
src/error.rs
@@ -12,3 +12,13 @@ pub enum Error {
12
13
/// Result type where errors are of type [Error](enum@Error).
14
pub type Result<T = ()> = StdResult<T, Error>;
15
+
16
+impl From<Error> for IoError {
17
+ fn from(value: Error) -> Self {
18
+ match value {
19
+ Error::IO(err) => err,
20
+ // If other error types are added in the future:
21
+ // err => IoError::new(std::io::ErrorKind::Other, err),
22
+ }
23
24
+}
0 commit comments