diff options
| author | Botahamec <botahamec@outlook.com> | 2024-05-27 00:33:16 -0400 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2024-05-27 00:33:16 -0400 |
| commit | 329bb3a2230fd2c26edde116c7dad2f9a37c199d (patch) | |
| tree | 312a8e9fb8769fce2d8c53e169f09f199f43d5c1 /src/collection/ref.rs | |
| parent | d5496c35c1c62492516baca30043c3cbec1a718c (diff) | |
Fixed UB pertaining to Box
Diffstat (limited to 'src/collection/ref.rs')
| -rw-r--r-- | src/collection/ref.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/collection/ref.rs b/src/collection/ref.rs index d8c7f2e..cc234d1 100644 --- a/src/collection/ref.rs +++ b/src/collection/ref.rs @@ -10,7 +10,7 @@ use super::{utils, LockGuard, RefLockCollection}; pub fn get_locks<L: Lockable>(data: &L) -> Vec<&dyn RawLock> { let mut locks = Vec::new(); data.get_ptrs(&mut locks); - locks.sort_by_key(|lock| std::ptr::from_ref(*lock)); + locks.sort_by_key(|lock| *lock as *const dyn RawLock); locks } |
