summaryrefslogtreecommitdiff
path: root/src/collection/utils.rs
diff options
context:
space:
mode:
authorMica White <botahamec@outlook.com>2026-09-13 15:12:08 -0400
committerMica White <botahamec@outlook.com>2026-09-13 15:12:08 -0400
commit16d6bd7ece4c4b9b72f6bd51c9b034270b745525 (patch)
tree4ff744fc41319ce73abe06416fabeaa7c17fbd46 /src/collection/utils.rs
parent9fd7b94cd7c20abe66cea875a0e83e76a7a00fbc (diff)
Support no_stdno-std
Diffstat (limited to 'src/collection/utils.rs')
-rwxr-xr-xsrc/collection/utils.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/collection/utils.rs b/src/collection/utils.rs
index e79b78b..236853c 100755
--- a/src/collection/utils.rs
+++ b/src/collection/utils.rs
@@ -1,4 +1,6 @@
-use std::cell::Cell;
+use core::cell::Cell;
+
+use alloc::vec::Vec;
use crate::handle_unwind::handle_unwind;
use crate::lockable::{Lockable, RawLock, Sharable};
@@ -32,7 +34,7 @@ pub fn ordered_contains_duplicates(l: &[&dyn RawLock]) -> bool {
l.windows(2)
// NOTE: addr_eq is necessary because eq would also compare the v-table pointers
- .any(|window| std::ptr::addr_eq(window[0], window[1]))
+ .any(|window| core::ptr::addr_eq(window[0], window[1]))
}
/// Lock a set of locks in the given order. It's UB to call this without a `ThreadKey`