From 891daed5a150ed7cb161db81b5289375f528cc49 Mon Sep 17 00:00:00 2001 From: aumetra Date: Tue, 1 Oct 2024 20:47:14 +0200 Subject: [PATCH] Use inline const --- async-stream/src/yielder.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/async-stream/src/yielder.rs b/async-stream/src/yielder.rs index 226cc2c..4b7a944 100644 --- a/async-stream/src/yielder.rs +++ b/async-stream/src/yielder.rs @@ -34,10 +34,7 @@ pub unsafe fn pair() -> (Sender, Receiver) { // Tracks the pointer to `Option`. // // TODO: Ensure wakers match? -thread_local! { - #[allow(clippy::missing_const_for_thread_local)] - static STORE: Cell<*mut ()> = Cell::new(ptr::null_mut()) -} +thread_local!(static STORE: Cell<*mut ()> = const { Cell::new(ptr::null_mut()) }); // ===== impl Sender =====