Skip to content

Commit 335da33

Browse files
authored
Replace into_error method with impl Into (#179)
Fixes #169
1 parent e0b33b0 commit 335da33

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,18 @@ impl GlobError {
299299
}
300300

301301
/// Consumes self, returning the _raw_ underlying `io::Error`
302+
#[deprecated(note = "use `.into` instead")]
302303
pub fn into_error(self) -> io::Error {
303304
self.error
304305
}
305306
}
306307

308+
impl From<GlobError> for io::Error {
309+
fn from(value: GlobError) -> Self {
310+
value.error
311+
}
312+
}
313+
307314
impl Error for GlobError {
308315
#[allow(deprecated)]
309316
fn description(&self) -> &str {

0 commit comments

Comments
 (0)