Skip to content

Commit

Permalink
Do not unwrap call to bypass()
Browse files Browse the repository at this point in the history
  • Loading branch information
rmja committed Oct 31, 2023
1 parent 0e9d9ac commit e1b6eae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ where
// The matches/if let dance is to fix lifetime of the borrowed inner connection.
#[cfg(feature = "embedded-tls")]
if matches!(self.buffered.bypass(), Ok(HttpConnection::Tls(_))) {
if let HttpConnection::Tls(ref mut tls) = self.buffered.bypass().unwrap() {
if let Ok(HttpConnection::Tls(ref mut tls)) = self.buffered.bypass() {
return tls.fill_buf().await.map_err(|e| e.kind());
}
unreachable!();
Expand Down

0 comments on commit e1b6eae

Please sign in to comment.