From 64c001e03e5c28f0669635dee0a99667cc3897bc Mon Sep 17 00:00:00 2001 From: ranfdev Date: Sun, 23 Jul 2023 10:46:19 +0200 Subject: [PATCH] Fix panic in gio InputStream --- gio/src/input_stream.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/src/input_stream.rs b/gio/src/input_stream.rs index 194a52e38088..a65a02b8f41c 100644 --- a/gio/src/input_stream.rs +++ b/gio/src/input_stream.rs @@ -450,7 +450,7 @@ impl> InputStreamAsyncBufRead { } } Poll::Ready(Err((_, err))) => { - let kind = err.kind::().unwrap(); + let kind = err.kind::().unwrap_or(crate::IOErrorEnum::Failed); self.state = State::Failed(kind); Poll::Ready(Err(io::Error::new(io::ErrorKind::from(kind), err))) }