Skip to content

Commit c856946

Browse files
MagicalTuxclaude
andcommitted
rt(threadpool): avoid unused_mut warning when acme feature is off
The ACME min-workers adjustment is cfg-gated, so `let mut workers` was never mutated in non-acme builds, warning under the feature-combo CI job. Shadow instead of mutating so every feature combination stays warning-clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent c1344bf commit c856946

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/rt/threadpool.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ pub(crate) fn run(
3737
// worker that blocks issuing a certificate needs *another* worker to answer
3838
// the CA's validation connection to the same server. Force at least two
3939
// effective workers whenever ACME is active, regardless of user input.
40-
let mut workers = workers.max(1);
40+
let workers = workers.max(1);
4141
#[cfg(feature = "acme")]
42-
if matches!(tls, TlsMode::Acme(_)) {
43-
workers = workers.max(2);
44-
}
42+
let workers = if matches!(tls, TlsMode::Acme(_)) {
43+
workers.max(2)
44+
} else {
45+
workers
46+
};
4547
let shared = Arc::new(Shared { cfg, tls });
4648
// Bound the queue of accepted-but-unserved connections. Each queued stream
4749
// holds an open descriptor, so an unbounded queue lets a connection burst

0 commit comments

Comments
 (0)