Fix clippy::missing-const-for-thread-local
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -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])
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user