From a4dd58be5989afedddec023174b2cdcd81912239 Mon Sep 17 00:00:00 2001 From: Valentin Gosu <1454649+valenting@users.noreply.github.com> Date: Tue, 2 Apr 2024 12:45:47 +0200 Subject: [PATCH] Fix lint (#920) --- form_urlencoded/src/lib.rs | 3 +++ percent_encoding/src/lib.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/form_urlencoded/src/lib.rs b/form_urlencoded/src/lib.rs index 30221ad22..1d68579b7 100644 --- a/form_urlencoded/src/lib.rs +++ b/form_urlencoded/src/lib.rs @@ -396,6 +396,9 @@ pub(crate) fn encode<'a>(encoding_override: EncodingOverride<'_>, input: &'a str input.as_bytes().into() } +// std::ptr::addr_eq was stabilized in rust 1.76. Once we upgrade +// the MSRV we can remove this lint override. +#[allow(ambiguous_wide_pointer_comparisons)] pub(crate) fn decode_utf8_lossy(input: Cow<'_, [u8]>) -> Cow<'_, str> { // Note: This function is duplicated in `percent_encoding/lib.rs`. match input { diff --git a/percent_encoding/src/lib.rs b/percent_encoding/src/lib.rs index e02a43949..5e68fc9cf 100644 --- a/percent_encoding/src/lib.rs +++ b/percent_encoding/src/lib.rs @@ -447,6 +447,9 @@ impl<'a> PercentDecode<'a> { } } +// std::ptr::addr_eq was stabilized in rust 1.76. Once we upgrade +// the MSRV we can remove this lint override. +#[allow(ambiguous_wide_pointer_comparisons)] #[cfg(feature = "alloc")] fn decode_utf8_lossy(input: Cow<'_, [u8]>) -> Cow<'_, str> { // Note: This function is duplicated in `form_urlencoded/src/query_encoding.rs`.