File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -383,28 +383,24 @@ impl<Static: StaticAtomSet> Atom<Static> {
383383
384384#[ inline( always) ]
385385fn inline_atom_slice ( x : & NonZeroU64 ) -> & [ u8 ] {
386- unsafe {
387386 let x: * const NonZeroU64 = x;
388387 let mut data = x as * const u8 ;
389388 // All except the lowest byte, which is first in little-endian, last in big-endian.
390389 if cfg ! ( target_endian = "little" ) {
391- data = data. offset ( 1 ) ;
390+ data = unsafe { data. offset ( 1 ) } ;
392391 }
393392 let len = 7 ;
394- slice:: from_raw_parts ( data, len)
395- }
393+ unsafe { slice:: from_raw_parts ( data, len) }
396394}
397395
398396#[ inline( always) ]
399- fn inline_atom_slice_mut ( x : & mut u64 ) -> & mut [ u8 ] {
400- unsafe {
397+ fn inline_atom_slice_mut ( x : & mut u64 ) -> & mut [ u8 ] {
401398 let x: * mut u64 = x;
402399 let mut data = x as * mut u8 ;
403400 // All except the lowest byte, which is first in little-endian, last in big-endian.
404401 if cfg ! ( target_endian = "little" ) {
405- data = data. offset ( 1 ) ;
402+ data = unsafe { data. offset ( 1 ) } ;
406403 }
407404 let len = 7 ;
408- slice:: from_raw_parts_mut ( data, len)
409- }
405+ unsafe { slice:: from_raw_parts_mut ( data, len) }
410406}
You can’t perform that action at this time.
0 commit comments