diff --git a/quinn/src/streams.rs b/quinn/src/streams.rs index 0dccaf30c..30ff5a221 100644 --- a/quinn/src/streams.rs +++ b/quinn/src/streams.rs @@ -628,11 +628,8 @@ impl From for io::Error { fn from(x: ReadError) -> Self { use self::ReadError::*; let kind = match x { - ConnectionClosed(e) => { - return e.into(); - } Reset { .. } | ZeroRttRejected => io::ErrorKind::ConnectionReset, - UnknownStream => io::ErrorKind::NotConnected, + ConnectionClosed(_) | UnknownStream => io::ErrorKind::NotConnected, IllegalOrderedRead => io::ErrorKind::InvalidInput, }; io::Error::new(kind, x) @@ -686,11 +683,8 @@ impl From for io::Error { fn from(x: WriteError) -> Self { use self::WriteError::*; let kind = match x { - ConnectionClosed(e) => { - return e.into(); - } Stopped(_) | ZeroRttRejected => io::ErrorKind::ConnectionReset, - UnknownStream => io::ErrorKind::NotConnected, + ConnectionClosed(_) | UnknownStream => io::ErrorKind::NotConnected, }; io::Error::new(kind, x) }