Skip to content

Commit

Permalink
Fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
wenyuzhao committed Mar 13, 2024
1 parent 22bbcb8 commit 9ad5048
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mallockit/src/mutator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub(crate) struct InternalTLS {

impl InternalTLS {
#[allow(unused)]
fn new() -> Self {
const fn new() -> Self {
Self {
meta: MetaLocal::new(),
}
Expand All @@ -79,7 +79,7 @@ impl InternalTLS {
#[cfg(not(target_os = "macos"))]
#[thread_local]
static mut INTERNAL_TLS: std::cell::UnsafeCell<InternalTLS> =
std::cell::UnsafeCell::new(InternalTLS::NEW);
std::cell::UnsafeCell::new(InternalTLS::new());

pub trait TLS: Sized {
fn new() -> Self;
Expand Down

0 comments on commit 9ad5048

Please sign in to comment.