Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Callum Dunster <[email protected]>
  • Loading branch information
neonphog and cdunster authored Oct 15, 2024
1 parent 8d01f56 commit e35d3d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/tx5/src/backend/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ fn gen_pub_key(uniq: u64, loc: usize) -> PubKey {

fn parse_pub_key(pub_key: &PubKey) -> (u64, usize) {
let mut uniq = [0; 8];
uniq.copy_from_slice(&(*pub_key)[16..24]);
uniq.copy_from_slice(&pub_key[16..24]);
let uniq = u64::from_be_bytes(uniq);

let mut loc = [0; 8];
loc.copy_from_slice(&(*pub_key)[24..32]);
loc.copy_from_slice(&pub_key[24..32]);
let loc = u64::from_be_bytes(loc) as usize;

(uniq, loc)
Expand Down

0 comments on commit e35d3d5

Please sign in to comment.