summaryrefslogtreecommitdiff
path: root/src/key.rs
diff options
context:
space:
mode:
authorBotahamec <botahamec@outlook.com>2025-02-05 20:31:00 -0500
committerBotahamec <botahamec@outlook.com>2025-02-05 20:31:00 -0500
commitf6b38f7425a3183214dae79445446b042154688f (patch)
tree1219d7cc4420ff4ad58a017c0f5861b7a2936f3b /src/key.rs
parent280a61ad7b74019c7aad8b7306a0dd7cfb11359c (diff)
Tests and optimization
Diffstat (limited to 'src/key.rs')
-rw-r--r--src/key.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/key.rs b/src/key.rs
index c7369be..4cd145d 100644
--- a/src/key.rs
+++ b/src/key.rs
@@ -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")