diff --git a/src/lib.rs b/src/lib.rs index 133a17a..fcfdf8c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -299,11 +299,18 @@ impl GlobError { } /// Consumes self, returning the _raw_ underlying `io::Error` + #[deprecated(note = "use `.into` instead")] pub fn into_error(self) -> io::Error { self.error } } +impl From for io::Error { + fn from(value: GlobError) -> Self { + value.error + } +} + impl Error for GlobError { #[allow(deprecated)] fn description(&self) -> &str {