Skip to content

Commit

Permalink
Fix lint (#920)
Browse files Browse the repository at this point in the history
  • Loading branch information
valenting authored Apr 2, 2024
1 parent 73803fa commit a4dd58b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions form_urlencoded/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions percent_encoding/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit a4dd58b

Please sign in to comment.