Skip to content

Commit

Permalink
more clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
codyps committed Nov 6, 2021
1 parent 78e9e7b commit 874044c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl Note {

// technically safe because we'll only panic if I screw up
fn from_bytes_raw(data: &[u8]) -> &Self {
unsafe { std::mem::transmute::<&[u8], &Self>(data) }
unsafe { &*(data as *const [u8] as *const Note) }
}

fn from_bytes(data: &[u8]) -> Result<(&Self, &[u8]), NoteError> {
Expand Down

0 comments on commit 874044c

Please sign in to comment.