diff --git a/wgpu-core/src/ray_tracing.rs b/wgpu-core/src/ray_tracing.rs index 11ccb714f..f6102b552 100644 --- a/wgpu-core/src/ray_tracing.rs +++ b/wgpu-core/src/ray_tracing.rs @@ -13,7 +13,7 @@ use crate::{ id::{BlasId, BufferId, TlasId}, resource::CreateBufferError, }; -use std::sync::Arc; +use std::{mem::size_of, sync::Arc}; use std::{num::NonZeroU64, slice}; use crate::resource::{Blas, ResourceErrorIdent, Tlas}; @@ -325,11 +325,8 @@ pub(crate) fn tlas_instance_into_bytes( }; let temp: *const _ = &temp; unsafe { - slice::from_raw_parts::( - temp.cast::(), - std::mem::size_of::(), - ) - .to_vec() + slice::from_raw_parts::(temp.cast::(), size_of::()) + .to_vec() } } _ => unimplemented!(),