File tree 1 file changed +5
-9
lines changed
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> {
383
383
384
384
#[ inline( always) ]
385
385
fn inline_atom_slice ( x : & NonZeroU64 ) -> & [ u8 ] {
386
- unsafe {
387
386
let x: * const NonZeroU64 = x;
388
387
let mut data = x as * const u8 ;
389
388
// All except the lowest byte, which is first in little-endian, last in big-endian.
390
389
if cfg ! ( target_endian = "little" ) {
391
- data = data. offset ( 1 ) ;
390
+ data = unsafe { data. offset ( 1 ) } ;
392
391
}
393
392
let len = 7 ;
394
- slice:: from_raw_parts ( data, len)
395
- }
393
+ unsafe { slice:: from_raw_parts ( data, len) }
396
394
}
397
395
398
396
#[ 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 ] {
401
398
let x: * mut u64 = x;
402
399
let mut data = x as * mut u8 ;
403
400
// All except the lowest byte, which is first in little-endian, last in big-endian.
404
401
if cfg ! ( target_endian = "little" ) {
405
- data = data. offset ( 1 ) ;
402
+ data = unsafe { data. offset ( 1 ) } ;
406
403
}
407
404
let len = 7 ;
408
- slice:: from_raw_parts_mut ( data, len)
409
- }
405
+ unsafe { slice:: from_raw_parts_mut ( data, len) }
410
406
}
You can’t perform that action at this time.
0 commit comments