summaryrefslogtreecommitdiff
path: root/src/mutex/mutex.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mutex/mutex.rs')
-rwxr-xr-xsrc/mutex/mutex.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mutex/mutex.rs b/src/mutex/mutex.rs
index dc374aa..f6db081 100755
--- a/src/mutex/mutex.rs
+++ b/src/mutex/mutex.rs
@@ -1,8 +1,9 @@
-use std::cell::UnsafeCell;
-use std::fmt::Debug;
-use std::marker::PhantomData;
-use std::panic::AssertUnwindSafe;
+use core::cell::UnsafeCell;
+use core::fmt::Debug;
+use core::marker::PhantomData;
+use core::panic::AssertUnwindSafe;
+use alloc::vec::Vec;
use lock_api::RawMutex;
use crate::handle_unwind::handle_unwind;
@@ -147,7 +148,7 @@ impl<T, R: RawMutex> Mutex<T, R> {
#[mutants::skip]
#[cfg(not(tarpaulin_include))]
impl<T: ?Sized + Debug, R: RawMutex> Debug for Mutex<T, R> {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
// safety: this is just a try lock, and the value is dropped
// immediately after, so there's no risk of blocking ourselves
// or any other threads
@@ -157,7 +158,7 @@ impl<T: ?Sized + Debug, R: RawMutex> Debug for Mutex<T, R> {
} else {
struct LockedPlaceholder;
impl Debug for LockedPlaceholder {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.write_str("<locked>")
}
}