chore: qualify std::mem::size_of with use (again)

This commit is contained in:
Erich Gubler 2024-11-13 22:12:06 -05:00
parent 693eaaf7f8
commit 3767a62339

View File

@ -13,7 +13,7 @@ use crate::{
id::{BlasId, BufferId, TlasId}, id::{BlasId, BufferId, TlasId},
resource::CreateBufferError, resource::CreateBufferError,
}; };
use std::sync::Arc; use std::{mem::size_of, sync::Arc};
use std::{num::NonZeroU64, slice}; use std::{num::NonZeroU64, slice};
use crate::resource::{Blas, ResourceErrorIdent, Tlas}; use crate::resource::{Blas, ResourceErrorIdent, Tlas};
@ -325,10 +325,7 @@ pub(crate) fn tlas_instance_into_bytes(
}; };
let temp: *const _ = &temp; let temp: *const _ = &temp;
unsafe { unsafe {
slice::from_raw_parts::<u8>( slice::from_raw_parts::<u8>(temp.cast::<u8>(), size_of::<RawTlasInstance>())
temp.cast::<u8>(),
std::mem::size_of::<RawTlasInstance>(),
)
.to_vec() .to_vec()
} }
} }