Skip to content

Commit

Permalink
Remove empty lines
Browse files Browse the repository at this point in the history
  • Loading branch information
mrobinson authored Mar 11, 2024
1 parent 01b2f7a commit 26110b3
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 @@ -364,21 +364,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 @@ -387,5 +384,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 26110b3

Please sign in to comment.