Skip to content

Commit

Permalink
Fix panic in gio InputStream
Browse files Browse the repository at this point in the history
  • Loading branch information
ranfdev committed Jul 23, 2023
1 parent 85d23fc commit 022fb84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gio/src/input_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,9 @@ impl<T: IsA<InputStream>> InputStreamAsyncBufRead<T> {
}
}
Poll::Ready(Err((_, err))) => {
let kind = err.kind::<crate::IOErrorEnum>().unwrap();
let kind = err
.kind::<crate::IOErrorEnum>()
.unwrap_or(crate::IOErrorEnum::Failed);
self.state = State::Failed(kind);
Poll::Ready(Err(io::Error::new(io::ErrorKind::from(kind), err)))
}
Expand Down

0 comments on commit 022fb84

Please sign in to comment.