Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bindgen/codegen/bitfield_unit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ where
let byte_index = index / 8;
let byte = unsafe {
*(core::ptr::addr_of!((*this).storage) as *const u8)
.offset(byte_index as isize)
.add(byte_index)
};

Self::extract_bit(byte, index)
Expand Down Expand Up @@ -84,7 +84,7 @@ where
let byte_index = index / 8;
let byte = unsafe {
(core::ptr::addr_of_mut!((*this).storage) as *mut u8)
.offset(byte_index as isize)
.add(byte_index)
};

unsafe { *byte = Self::change_bit(*byte, index, val) };
Expand Down
Loading