From ccd1575c3ce45049bc47f7836e190ed679dc5767 Mon Sep 17 00:00:00 2001 From: Marijn Schouten Date: Fri, 3 Jan 2025 13:50:28 +0100 Subject: [PATCH] elide explicit lifetimes to make clippy happy --- data-url/src/lib.rs | 2 +- form_urlencoded/src/lib.rs | 4 ++-- percent_encoding/src/lib.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/data-url/src/lib.rs b/data-url/src/lib.rs index d7ceeb111..f1adcc602 100644 --- a/data-url/src/lib.rs +++ b/data-url/src/lib.rs @@ -124,7 +124,7 @@ impl<'a> DataUrl<'a> { /// The URL’s fragment identifier (after `#`) pub struct FragmentIdentifier<'a>(&'a str); -impl<'a> FragmentIdentifier<'a> { +impl FragmentIdentifier<'_> { /// Like in a parsed URL pub fn to_percent_encoded(&self) -> String { let mut string = String::new(); diff --git a/form_urlencoded/src/lib.rs b/form_urlencoded/src/lib.rs index 1d68579b7..1d9582249 100644 --- a/form_urlencoded/src/lib.rs +++ b/form_urlencoded/src/lib.rs @@ -104,7 +104,7 @@ pub struct ParseIntoOwned<'a> { inner: Parse<'a>, } -impl<'a> Iterator for ParseIntoOwned<'a> { +impl Iterator for ParseIntoOwned<'_> { type Item = (String, String); fn next(&mut self) -> Option { @@ -195,7 +195,7 @@ impl Target for String { type Finished = Self; } -impl<'a> Target for &'a mut String { +impl Target for &mut String { fn as_mut_string(&mut self) -> &mut String { self } diff --git a/percent_encoding/src/lib.rs b/percent_encoding/src/lib.rs index efa04657a..b62924024 100644 --- a/percent_encoding/src/lib.rs +++ b/percent_encoding/src/lib.rs @@ -178,7 +178,7 @@ impl<'a> Iterator for PercentEncode<'a> { } } -impl<'a> fmt::Display for PercentEncode<'a> { +impl fmt::Display for PercentEncode<'_> { fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { for c in (*self).clone() { formatter.write_str(c)? @@ -254,7 +254,7 @@ fn after_percent_sign(iter: &mut slice::Iter<'_, u8>) -> Option { Some(h as u8 * 0x10 + l as u8) } -impl<'a> Iterator for PercentDecode<'a> { +impl Iterator for PercentDecode<'_> { type Item = u8; fn next(&mut self) -> Option {