Skip to content

Commit

Permalink
Update strip_prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Aug 30, 2023
1 parent 06c484d commit b10b6d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ const fn byte2hex<const UPPER: bool>(byte: u8) -> (u8, u8) {
#[inline]
fn strip_prefix(bytes: &[u8]) -> &[u8] {
if bytes.starts_with(b"0x") {
&bytes[2..]
unsafe { bytes.get_unchecked(2..) }
} else {
bytes
}
Expand Down

0 comments on commit b10b6d7

Please sign in to comment.