From ff0a4bae54e6b7f2808356d251160bf77fe4ef11 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Wed, 7 Sep 2022 07:32:52 +0200 Subject: [PATCH] Minor tweaks. --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 8d1f56c..57d0f6d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -490,7 +490,7 @@ pub mod unsync { #[cfg(feature = "critical-section")] #[inline] pub(crate) unsafe fn get_unchecked(&self) -> &T { - crate::unwrap_unchecked(self.get()) + unwrap_unchecked(self.get()) } /// Sets the contents of this cell to `value`. @@ -1380,11 +1380,13 @@ pub mod sync { pub mod race; #[cfg(feature = "sync")] +#[track_caller] #[inline] unsafe fn take_unchecked(val: &mut Option) -> T { unwrap_unchecked(val.take()) } +#[track_caller] #[inline] unsafe fn unwrap_unchecked(val: Option) -> T { match val {