diff options
| author | Botahamec <botahamec@outlook.com> | 2025-02-05 20:31:00 -0500 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2025-02-05 20:31:00 -0500 |
| commit | f6b38f7425a3183214dae79445446b042154688f (patch) | |
| tree | 1219d7cc4420ff4ad58a017c0f5861b7a2936f3b /src/key.rs | |
| parent | 280a61ad7b74019c7aad8b7306a0dd7cfb11359c (diff) | |
Tests and optimization
Diffstat (limited to 'src/key.rs')
| -rw-r--r-- | src/key.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,7 +1,6 @@ -use std::cell::Cell; +use std::cell::{Cell, LazyCell}; use std::fmt::{self, Debug}; use std::marker::PhantomData; -use std::sync::LazyLock; use sealed::Sealed; @@ -16,7 +15,7 @@ mod sealed { } thread_local! { - static KEY: LazyLock<KeyCell> = LazyLock::new(KeyCell::default); + static KEY: LazyCell<KeyCell> = LazyCell::new(KeyCell::default); } /// The key for the current thread. @@ -44,6 +43,7 @@ unsafe impl Keyable for &mut ThreadKey {} unsafe impl Sync for ThreadKey {} #[mutants::skip] +#[cfg(not(tarpaulin_include))] impl Debug for ThreadKey { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "ThreadKey") |
