From 921b29c445f9c56fb7e41d1e94e61413a4f316c9 Mon Sep 17 00:00:00 2001 From: Micha White Date: Tue, 21 May 2024 13:01:27 -0400 Subject: Remove async experiment --- src/collection/ref_collection.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/collection/ref_collection.rs') diff --git a/src/collection/ref_collection.rs b/src/collection/ref_collection.rs index 3e4d5f8..9dfa0e9 100644 --- a/src/collection/ref_collection.rs +++ b/src/collection/ref_collection.rs @@ -15,9 +15,8 @@ fn get_locks<'a, L: Lockable<'a> + 'a>(data: &'a L) -> Vec<&'a dyn Lock> { /// returns `true` if the sorted list contains a duplicate #[must_use] fn contains_duplicates(l: &[&dyn Lock]) -> bool { - l.windows(2).any(|window| { - std::ptr::addr_eq(std::ptr::from_ref(window[0]), std::ptr::from_ref(window[1])) - }) + l.windows(2) + .any(|window| std::ptr::eq(window[0], window[1])) } impl<'a, L: Lockable<'a>> AsRef for RefLockCollection<'a, L> { -- cgit v1.2.3