Skip to content

Commit a4dd58b

Browse files
authored
Fix lint (#920)
1 parent 73803fa commit a4dd58b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

form_urlencoded/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ pub(crate) fn encode<'a>(encoding_override: EncodingOverride<'_>, input: &'a str
396396
input.as_bytes().into()
397397
}
398398

399+
// std::ptr::addr_eq was stabilized in rust 1.76. Once we upgrade
400+
// the MSRV we can remove this lint override.
401+
#[allow(ambiguous_wide_pointer_comparisons)]
399402
pub(crate) fn decode_utf8_lossy(input: Cow<'_, [u8]>) -> Cow<'_, str> {
400403
// Note: This function is duplicated in `percent_encoding/lib.rs`.
401404
match input {

percent_encoding/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ impl<'a> PercentDecode<'a> {
447447
}
448448
}
449449

450+
// std::ptr::addr_eq was stabilized in rust 1.76. Once we upgrade
451+
// the MSRV we can remove this lint override.
452+
#[allow(ambiguous_wide_pointer_comparisons)]
450453
#[cfg(feature = "alloc")]
451454
fn decode_utf8_lossy(input: Cow<'_, [u8]>) -> Cow<'_, str> {
452455
// Note: This function is duplicated in `form_urlencoded/src/query_encoding.rs`.

0 commit comments

Comments
 (0)