Skip to content

Commit

Permalink
mark unreachable code as unreachable
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobsonchase committed Oct 3, 2023
1 parent fd9a023 commit c9a2949
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ngrok/src/proxy_proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ impl WriteState {
Poll::Pending | Poll::Ready(Err(_)) => {
*self = WriteState::Writing(buf);
ready!(write_res)?;
return Ok(()).into();
unreachable!(
"ready! will return for us on either Pending or Ready(Err)"
);
}
Poll::Ready(Ok(written)) => {
buf.advance(written);
Expand Down

0 comments on commit c9a2949

Please sign in to comment.