Skip to content

Commit b1ca9df

Browse files
chore: hoist std::mem::size_of import, Vulkan edition
1 parent a902645 commit b1ca9df

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

wgpu-hal/src/vulkan/device.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ use std::{
99
borrow::Cow,
1010
collections::{hash_map::Entry, BTreeMap},
1111
ffi::{CStr, CString},
12-
mem,
13-
mem::MaybeUninit,
12+
mem::{self, size_of, MaybeUninit},
1413
num::NonZeroU32,
1514
ptr, slice,
1615
sync::Arc,
@@ -2571,8 +2570,7 @@ impl crate::Device for super::Device {
25712570
};
25722571
let temp: *const _ = &temp;
25732572
unsafe {
2574-
slice::from_raw_parts::<u8>(temp.cast::<u8>(), mem::size_of::<RawTlasInstance>())
2575-
.to_vec()
2573+
slice::from_raw_parts::<u8>(temp.cast::<u8>(), size_of::<RawTlasInstance>()).to_vec()
25762574
}
25772575
}
25782576
}

0 commit comments

Comments
 (0)