summaryrefslogtreecommitdiff
path: root/src/collection/ref_collection.rs
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2024-05-21 13:01:27 -0400
committerMicha White <botahamec@outlook.com>2024-05-21 13:01:27 -0400
commit921b29c445f9c56fb7e41d1e94e61413a4f316c9 (patch)
tree35df56ab19f1654e73ae625bd1870a06698aa8de /src/collection/ref_collection.rs
parentad76d43dc28b8802d64eb7ddcd9e02d3d12ac89a (diff)
Remove async experiment
Diffstat (limited to 'src/collection/ref_collection.rs')
-rw-r--r--src/collection/ref_collection.rs5
1 files changed, 2 insertions, 3 deletions
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<L> for RefLockCollection<'a, L> {