@@ -114,7 +114,7 @@ pub fn percent_encode_byte(byte: u8) -> &'static str {
114
114
/// assert_eq!(percent_encode(b"foo bar?", NON_ALPHANUMERIC).to_string(), "foo%20bar%3F");
115
115
/// ```
116
116
#[ 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 < ' _ > {
118
118
PercentEncode {
119
119
bytes : input,
120
120
ascii_set : ascii_set. into ( ) ,
@@ -133,10 +133,7 @@ pub fn percent_encode<'a, T: Into<AsciiSet>>(input: &'a [u8], ascii_set: T) -> P
133
133
/// assert_eq!(utf8_percent_encode("foo bar?", NON_ALPHANUMERIC).to_string(), "foo%20bar%3F");
134
134
/// ```
135
135
#[ 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 < ' _ > {
140
137
percent_encode ( input. as_bytes ( ) , ascii_set)
141
138
}
142
139
@@ -382,6 +379,7 @@ mod tests {
382
379
383
380
#[ test]
384
381
fn percent_encode_accepts_ascii_set_ref ( ) {
382
+ #[ allow( clippy:: needless_borrows_for_generic_args) ] // tests prior behavior
385
383
let encoded = percent_encode ( b"foo bar?" , & AsciiSet :: EMPTY ) ;
386
384
assert_eq ! ( encoded. collect:: <String >( ) , "foo bar?" ) ;
387
385
}
@@ -415,6 +413,7 @@ mod tests {
415
413
416
414
#[ test]
417
415
fn utf8_percent_encode_accepts_ascii_set_ref ( ) {
416
+ #[ allow( clippy:: needless_borrows_for_generic_args) ] // tests prior behavior
418
417
let encoded = super :: utf8_percent_encode ( "foo bar?" , & AsciiSet :: EMPTY ) ;
419
418
assert_eq ! ( encoded. collect:: <String >( ) , "foo bar?" ) ;
420
419
}
0 commit comments