From 16d6bd7ece4c4b9b72f6bd51c9b034270b745525 Mon Sep 17 00:00:00 2001 From: Mica White Date: Sun, 13 Sep 2026 15:12:08 -0400 Subject: Support no_std --- src/collection/utils.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/collection/utils.rs') 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` -- cgit v1.3.1