aboutsummaryrefslogtreecommitdiff
path: root/src/raw/generic.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/raw/generic.rs')
-rw-r--r--src/raw/generic.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/raw/generic.rs b/src/raw/generic.rs
index 26f8c58..ef066e8 100644
--- a/src/raw/generic.rs
+++ b/src/raw/generic.rs
@@ -55,7 +55,7 @@ impl Group {
struct AlignedBytes {
_align: [Group; 0],
bytes: [u8; Group::WIDTH],
- };
+ }
const ALIGNED_BYTES: AlignedBytes = AlignedBytes {
_align: [],
bytes: [EMPTY; Group::WIDTH],
@@ -67,7 +67,7 @@ impl Group {
#[inline]
#[allow(clippy::cast_ptr_alignment)] // unaligned load
pub unsafe fn load(ptr: *const u8) -> Self {
- Group(ptr::read_unaligned(ptr as *const _))
+ Group(ptr::read_unaligned(ptr.cast()))
}
/// Loads a group of bytes starting at the given address, which must be
@@ -77,7 +77,7 @@ impl Group {
pub unsafe fn load_aligned(ptr: *const u8) -> Self {
// FIXME: use align_offset once it stabilizes
debug_assert_eq!(ptr as usize & (mem::align_of::<Self>() - 1), 0);
- Group(ptr::read(ptr as *const _))
+ Group(ptr::read(ptr.cast()))
}
/// Stores the group of bytes to the given address, which must be
@@ -87,7 +87,7 @@ impl Group {
pub unsafe fn store_aligned(self, ptr: *mut u8) {
// FIXME: use align_offset once it stabilizes
debug_assert_eq!(ptr as usize & (mem::align_of::<Self>() - 1), 0);
- ptr::write(ptr as *mut _, self.0);
+ ptr::write(ptr.cast(), self.0);
}
/// Returns a `BitMask` indicating all bytes in the group which *may*