Skip to content

Commit

Permalink
Remove empty lines
Browse files Browse the repository at this point in the history
  • Loading branch information
mrobinson committed Mar 11, 2024
1 parent 665bc0b commit 7c7044b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/atom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,21 +361,18 @@ impl<Static: StaticAtomSet> Atom<Static> {

#[inline(always)]
fn inline_atom_slice(x: &NonZeroU64) -> &[u8] {

let x: *const NonZeroU64 = x;
let mut data = x as *const u8;
// All except the lowest byte, which is first in little-endian, last in big-endian.
if cfg!(target_endian = "little") {
data = unsafe { data.offset(1) };
}
let len = 7;
unsafe { slice::from_raw_parts(data, len) }

unsafe { slice::from_raw_parts(data, len) }
}

#[inline(always)]
fn inline_atom_slice_mut(x: &mut u64) -> &mut [u8] {

fn inline_atom_slice_mut(x: &mut u64) -> &mut [u8] {
let x: *mut u64 = x;
let mut data = x as *mut u8;
// All except the lowest byte, which is first in little-endian, last in big-endian.
Expand All @@ -384,5 +381,4 @@ fn inline_atom_slice_mut(x: &mut u64) -> &mut [u8] {
}
let len = 7;
unsafe { slice::from_raw_parts_mut(data, len) }

}

0 comments on commit 7c7044b

Please sign in to comment.