From 63a24d37c3037c6e6a0dc92b985fa10be0a177fa Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Wed, 24 Jul 2024 11:00:13 -0400 Subject: [PATCH] chore: satisfy `clippy::ref_as_ptr` --- wgpu-core/src/lock/observing.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wgpu-core/src/lock/observing.rs b/wgpu-core/src/lock/observing.rs index a5e02c54b..f416239e4 100644 --- a/wgpu-core/src/lock/observing.rs +++ b/wgpu-core/src/lock/observing.rs @@ -369,16 +369,16 @@ impl ObservationLog { self.write_location(new_location); self.write_action(&Action::Acquisition { older_rank: older_lock.rank.bit.number(), - older_location: older_lock.location as *const _ as usize, + older_location: std::ptr::from_ref(older_lock.location) as usize, newer_rank: new_rank.bit.number(), - newer_location: new_location as *const _ as usize, + newer_location: std::ptr::from_ref(new_location) as usize, }); } fn write_location(&mut self, location: &'static Location<'static>) { if self.locations_seen.insert(location) { self.write_action(&Action::Location { - address: location as *const _ as usize, + address: std::ptr::from_ref(location) as usize, file: location.file(), line: location.line(), column: location.column(),