Skip to content

Commit

Permalink
More hygeine fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
james7132 committed Mar 23, 2024
1 parent 6af8066 commit 5921736
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/types/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ where
writer.advance(Self::METADATA.el_padding() as usize);
}
} else {
let ptr = self.as_ptr() as *const u8;
let ptr = self.as_ptr() as *const ::core::primitive::u8;
let byte_slice: &[::core::primitive::u8] =
unsafe { ::core::slice::from_raw_parts(ptr, ::core::mem::size_of::<Self>()) };
writer.write_slice(byte_slice);
Expand Down
2 changes: 1 addition & 1 deletion src/types/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ macro_rules! impl_matrix_inner {
writer.advance(<Self as $crate::private::ShaderType>::METADATA.col_padding() as ::core::primitive::usize);
}
} else {
let ptr = (self as *const Self) as *const u8;
let ptr = (self as *const Self) as *const ::core::primitive::u8;
let byte_slice: &[::core::primitive::u8] = unsafe {
::core::slice::from_raw_parts(ptr, ::core::mem::size_of::<Self>())
};
Expand Down
3 changes: 2 additions & 1 deletion src/types/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ macro_rules! impl_vector_inner {
}
} else {
let ptr: *const Self = self;
let ptr = ptr.cast::<::core::primitive::u8>();
let byte_slice: &[::core::primitive::u8] = unsafe {
::core::slice::from_raw_parts(ptr.cast::<u8>(), ::core::mem::size_of::<Self>())
::core::slice::from_raw_parts(ptr, ::core::mem::size_of::<Self>())
};
writer.write_slice(byte_slice);
}
Expand Down

0 comments on commit 5921736

Please sign in to comment.