From b10b6d797108f67624750a17565aefb52da00e7c Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Wed, 30 Aug 2023 14:59:31 +0200 Subject: [PATCH] Update strip_prefix --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 5fa34d9..1ab89f6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -687,7 +687,7 @@ const fn byte2hex(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 }