From f411c302204dbbc87d78945f7dd0c0102ee47893 Mon Sep 17 00:00:00 2001 From: pantonshire Date: Mon, 12 Sep 2022 16:47:31 +0100 Subject: [PATCH] encoding: remove redundant pointer cast in url::percent_decode_utf8 A debug assertion in `encoding::url::percent_decode_utf8` previously cast the result of `[u8]::as_ptr` to `*const u8`, which was redundant because the return type of the `as_ptr` call was already `*const u8`. This patch removes the redundant cast. --- src/encoding/url.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/encoding/url.rs b/src/encoding/url.rs index 1219720..74c9432 100644 --- a/src/encoding/url.rs +++ b/src/encoding/url.rs @@ -396,7 +396,7 @@ where Cow::Borrowed(decoded_str) => { debug_assert_eq!(decoded_str.len(), decoded.len()); debug_assert_eq!( - decoded_str.as_bytes().as_ptr() as *const u8, + decoded_str.as_bytes().as_ptr(), decoded.as_ptr() );