1- /* automatically generated by rust-bindgen 0.71 .1 */
1+ /* automatically generated by rust-bindgen 0.72 .1 */
22
33pub type __s8 = crate :: ctypes:: c_schar ;
44pub type __u8 = crate :: ctypes:: c_uchar ;
@@ -2937,7 +2937,7 @@ Self::extract_bit(byte, index)
29372937pub unsafe fn raw_get_bit ( this : * const Self , index : usize ) -> bool {
29382938debug_assert ! ( index / 8 < core:: mem:: size_of:: <Storage >( ) ) ;
29392939let byte_index = index / 8 ;
2940- let byte = * ( core:: ptr:: addr_of!( ( * this) . storage) as * const u8 ) . offset ( byte_index as isize ) ;
2940+ let byte = unsafe { * ( core:: ptr:: addr_of!( ( * this) . storage) as * const u8 ) . offset ( byte_index as isize ) } ;
29412941Self :: extract_bit ( byte, index)
29422942}
29432943#[ inline]
@@ -2961,8 +2961,8 @@ let byte = &mut self.storage.as_mut()[byte_index];
29612961pub unsafe fn raw_set_bit ( this : * mut Self , index : usize , val : bool ) {
29622962debug_assert ! ( index / 8 < core:: mem:: size_of:: <Storage >( ) ) ;
29632963let byte_index = index / 8 ;
2964- let byte = ( core:: ptr:: addr_of_mut!( ( * this) . storage) as * mut u8 ) . offset ( byte_index as isize ) ;
2965- * byte = Self :: change_bit ( * byte, index, val) ;
2964+ let byte = unsafe { ( core:: ptr:: addr_of_mut!( ( * this) . storage) as * mut u8 ) . offset ( byte_index as isize ) } ;
2965+ unsafe { * byte = Self :: change_bit ( * byte, index, val) } ;
29662966}
29672967#[ inline]
29682968pub fn get ( & self , bit_offset : usize , bit_width : u8 ) -> u64 {
@@ -2985,7 +2985,7 @@ debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
29852985debug_assert ! ( ( bit_offset + ( bit_width as usize ) ) / 8 <= core:: mem:: size_of:: <Storage >( ) ) ;
29862986let mut val = 0 ;
29872987for i in 0 ..( bit_width as usize ) {
2988- if Self :: raw_get_bit ( this, i + bit_offset) {
2988+ if unsafe { Self :: raw_get_bit ( this, i + bit_offset) } {
29892989let index = if cfg ! ( target_endian = "big" ) { bit_width as usize - 1 - i } else { i } ;
29902990val |= 1 << index;
29912991}
@@ -3013,7 +3013,7 @@ for i in 0..(bit_width as usize) {
30133013let mask = 1 << i;
30143014let val_bit_is_set = val & mask == mask;
30153015let index = if cfg ! ( target_endian = "big" ) { bit_width as usize - 1 - i } else { i } ;
3016- Self :: raw_set_bit ( this, index + bit_offset, val_bit_is_set) ;
3016+ unsafe { Self :: raw_set_bit ( this, index + bit_offset, val_bit_is_set) } ;
30173017}
30183018}
30193019}
0 commit comments