Skip to content

Commit

Permalink
chore: improve conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-aranha-cw committed Feb 4, 2025
1 parent af91a35 commit c7e6f62
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/eth/primitives/slot_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl SlotIndex {
mapping_index_bytes[32..64].copy_from_slice(&slot_index_bytes);

let hashed_bytes = keccak256(mapping_index_bytes);
Self::from(hashed_bytes.0)
Self::from(hashed_bytes)
}
}

Expand Down Expand Up @@ -67,6 +67,12 @@ impl From<RevmU256> for SlotIndex {
}
}

impl From<FixedBytes<32>> for SlotIndex {
fn from(value: FixedBytes<32>) -> Self {
Self::from(value.0)
}
}

// -----------------------------------------------------------------------------
// Tests
// -----------------------------------------------------------------------------
Expand Down

0 comments on commit c7e6f62

Please sign in to comment.