Fix clippy::missing-const-for-thread-local

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-05-14 13:05:43 +00:00
parent e248bb05d9
commit 5d115ddd6f
2 changed files with 2 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ pub struct Manager {
}
thread_local! {
static INDEX: Cell<usize> = 0.into();
static INDEX: Cell<usize> = const { Cell::new(0_usize) };
static HANDLE: RefCell<Handles> = const {
RefCell::new([const { None }; HISTORY])
};

View File

@@ -25,7 +25,7 @@ static NODE_TOPOLOGY: LazyLock<Masks> = LazyLock::new(init_node_topology);
thread_local! {
/// Tracks the affinity for this thread. This is updated when affinities
/// are set via our set_affinity() interface.
static CORE_AFFINITY: Cell<Mask> = Cell::default();
static CORE_AFFINITY: Cell<Mask> = const { Cell::new(0) };
}
/// Set the core affinity for this thread. The ID should be listed in