From c9a294955a88548f9b84ec32766b53be6f4e86db Mon Sep 17 00:00:00 2001 From: Josh Robson Chase Date: Tue, 3 Oct 2023 14:13:59 -0400 Subject: [PATCH] mark unreachable code as unreachable --- ngrok/src/proxy_proto.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ngrok/src/proxy_proto.rs b/ngrok/src/proxy_proto.rs index e474546..9d23c30 100644 --- a/ngrok/src/proxy_proto.rs +++ b/ngrok/src/proxy_proto.rs @@ -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);