From cbf628f7dc99c784273d3a1b7ee26803375229d2 Mon Sep 17 00:00:00 2001 From: Ray Walker Date: Fri, 27 Nov 2026 11:09:08 +1100 Subject: [PATCH] test(reliability): pin the shed-path future on the stack Beta clippy's unnecessary_box_pin lint flags Box::pin on a future that is polled once and dropped in the same statement. std::pin::pin! does the same job without the allocation, and keeps the beta job green under -D warnings. --- crates/cachekit/src/reliability.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cachekit/src/reliability.rs b/crates/cachekit/src/reliability.rs index 0364fab..36fe87f 100644 --- a/crates/cachekit/src/reliability.rs +++ b/crates/cachekit/src/reliability.rs @@ -1250,7 +1250,7 @@ mod tests { ); // Ready on the first poll is the queue-full shed: every other shed // path is only reachable after parking. - let third = poll_once(Box::pin(limiter.acquire()).as_mut()); + let third = poll_once(std::pin::pin!(limiter.acquire())); assert!( matches!(&third, Poll::Ready(Err(err)) if err.kind == BackendErrorKind::Backpressure), "queue of 1 is full, so the third caller sheds on its first poll: {third:?}"