From 39bab048004228af794a9c0a9d9bd1192253fa53 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Mon, 19 Feb 2024 11:36:15 +0000 Subject: [PATCH] chore: remove redundant imports --- actix-rt/src/arbiter.rs | 2 +- actix-rt/src/system.rs | 2 +- actix-tracing/src/lib.rs | 2 +- bytestring/src/lib.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/actix-rt/src/arbiter.rs b/actix-rt/src/arbiter.rs index 48cc752f..ee647aef 100644 --- a/actix-rt/src/arbiter.rs +++ b/actix-rt/src/arbiter.rs @@ -16,7 +16,7 @@ use crate::system::{System, SystemCommand}; pub(crate) static COUNT: AtomicUsize = AtomicUsize::new(0); thread_local!( - static HANDLE: RefCell> = RefCell::new(None); + static HANDLE: RefCell> = const { RefCell::new(None) }; ); pub(crate) enum ArbiterCommand { diff --git a/actix-rt/src/system.rs b/actix-rt/src/system.rs index 4c276beb..367a2d21 100644 --- a/actix-rt/src/system.rs +++ b/actix-rt/src/system.rs @@ -16,7 +16,7 @@ use crate::{arbiter::ArbiterHandle, Arbiter}; static SYSTEM_COUNT: AtomicUsize = AtomicUsize::new(0); thread_local!( - static CURRENT: RefCell> = RefCell::new(None); + static CURRENT: RefCell> = const { RefCell::new(None) }; ); /// A manager for a per-thread distributed async runtime. diff --git a/actix-tracing/src/lib.rs b/actix-tracing/src/lib.rs index b1b9061b..4107b429 100644 --- a/actix-tracing/src/lib.rs +++ b/actix-tracing/src/lib.rs @@ -131,7 +131,7 @@ mod test { use super::*; thread_local! { - static SPAN: RefCell> = RefCell::new(Vec::new()); + static SPAN: RefCell> = const { RefCell::new(Vec::new()) }; } #[derive(Default)] diff --git a/bytestring/src/lib.rs b/bytestring/src/lib.rs index 80ab085e..6cb164dc 100644 --- a/bytestring/src/lib.rs +++ b/bytestring/src/lib.rs @@ -13,7 +13,7 @@ use alloc::{ string::{String, ToString}, vec::Vec, }; -use core::{borrow::Borrow, convert::TryFrom, fmt, hash, ops, str}; +use core::{borrow::Borrow, fmt, hash, ops, str}; use bytes::Bytes;