From df9f106d5ba2d5bd029e80d128cc385b10b0c9df Mon Sep 17 00:00:00 2001 From: Pablo Garcia Date: Fri, 14 Aug 2026 13:36:43 +0200 Subject: [PATCH] remove redundant continue in loops and drop needless_continue allow --- Cargo.toml | 1 - src/proto/h1/dispatch.rs | 1 - src/proto/h2/client.rs | 1 - src/proto/h2/upgrade.rs | 4 +--- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 150b030a75..5a02a7215b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -134,7 +134,6 @@ missing_fields_in_debug = "allow" # TODO: use finish_non_exhaustive missing_panics_doc = "allow" # TODO: might be false multiple_inherent_impl = "allow" multiple_unsafe_ops_per_block = "allow" -needless_continue = "allow" needless_pass_by_value = "allow" panic = "allow" pattern_type_mismatch = "allow" diff --git a/src/proto/h1/dispatch.rs b/src/proto/h1/dispatch.rs index 03aaba1a9e..f250f55863 100644 --- a/src/proto/h1/dispatch.rs +++ b/src/proto/h1/dispatch.rs @@ -430,7 +430,6 @@ where ); } else { trace!("discarding unknown frame"); - continue; } } else { *clear_body = true; diff --git a/src/proto/h2/client.rs b/src/proto/h2/client.rs index 4803dba0f1..eb768baa76 100644 --- a/src/proto/h2/client.rs +++ b/src/proto/h2/client.rs @@ -772,7 +772,6 @@ where } } self.poll_pipe(f, cx); - continue; } Poll::Ready(None) => { diff --git a/src/proto/h2/upgrade.rs b/src/proto/h2/upgrade.rs index f4e65466a2..217aa27e88 100644 --- a/src/proto/h2/upgrade.rs +++ b/src/proto/h2/upgrade.rs @@ -236,9 +236,7 @@ impl Read for H2Upgraded { self.buf = loop { match ready!(self.recv_stream.poll_data(cx)) { None => return Poll::Ready(Ok(())), - Some(Ok(buf)) if buf.is_empty() && !self.recv_stream.is_end_stream() => { - continue - } + Some(Ok(buf)) if buf.is_empty() && !self.recv_stream.is_end_stream() => {} Some(Ok(buf)) => { self.ping.record_data(buf.len()); break buf;