@@ -114,7 +114,7 @@ pub fn percent_encode_byte(byte: u8) -> &'static str {
114114/// assert_eq!(percent_encode(b"foo bar?", NON_ALPHANUMERIC).to_string(), "foo%20bar%3F");
115115/// ```
116116#[ inline]
117- pub fn percent_encode < ' a , T : Into < AsciiSet > > ( input : & ' a [ u8 ] , ascii_set : T ) -> PercentEncode < ' a > {
117+ pub fn percent_encode < T : Into < AsciiSet > > ( input : & [ u8 ] , ascii_set : T ) -> PercentEncode < ' _ > {
118118 PercentEncode {
119119 bytes : input,
120120 ascii_set : ascii_set. into ( ) ,
@@ -133,10 +133,7 @@ pub fn percent_encode<'a, T: Into<AsciiSet>>(input: &'a [u8], ascii_set: T) -> P
133133/// assert_eq!(utf8_percent_encode("foo bar?", NON_ALPHANUMERIC).to_string(), "foo%20bar%3F");
134134/// ```
135135#[ inline]
136- pub fn utf8_percent_encode < ' a , T : Into < AsciiSet > > (
137- input : & ' a str ,
138- ascii_set : T ,
139- ) -> PercentEncode < ' a > {
136+ pub fn utf8_percent_encode < T : Into < AsciiSet > > ( input : & str , ascii_set : T ) -> PercentEncode < ' _ > {
140137 percent_encode ( input. as_bytes ( ) , ascii_set)
141138}
142139
@@ -382,6 +379,7 @@ mod tests {
382379
383380 #[ test]
384381 fn percent_encode_accepts_ascii_set_ref ( ) {
382+ #[ allow( clippy:: needless_borrows_for_generic_args) ] // tests prior behavior
385383 let encoded = percent_encode ( b"foo bar?" , & AsciiSet :: EMPTY ) ;
386384 assert_eq ! ( encoded. collect:: <String >( ) , "foo bar?" ) ;
387385 }
@@ -415,6 +413,7 @@ mod tests {
415413
416414 #[ test]
417415 fn utf8_percent_encode_accepts_ascii_set_ref ( ) {
416+ #[ allow( clippy:: needless_borrows_for_generic_args) ] // tests prior behavior
418417 let encoded = super :: utf8_percent_encode ( "foo bar?" , & AsciiSet :: EMPTY ) ;
419418 assert_eq ! ( encoded. collect:: <String >( ) , "foo bar?" ) ;
420419 }
0 commit comments