@@ -448,7 +448,7 @@ impl Url {
448
448
/// let base = Url::parse("https://alice.com/a")?;
449
449
/// let url = base.join("http://eve.com/b")?;
450
450
/// assert_eq!(url.as_str(), "http://eve.com/b"); // http instead of https
451
-
451
+ ///
452
452
/// # Ok(())
453
453
/// # }
454
454
/// # run().unwrap();
@@ -1492,7 +1492,6 @@ impl Url {
1492
1492
/// # }
1493
1493
/// # run().unwrap();
1494
1494
/// ```
1495
-
1496
1495
#[ inline]
1497
1496
pub fn query_pairs ( & self ) -> form_urlencoded:: Parse < ' _ > {
1498
1497
form_urlencoded:: parse ( self . query ( ) . unwrap_or ( "" ) . as_bytes ( ) )
@@ -1555,7 +1554,7 @@ impl Url {
1555
1554
/// # fn run() -> Result<(), ParseError> {
1556
1555
/// let mut url = Url::parse("https://example.com/data.csv")?;
1557
1556
/// assert_eq!(url.as_str(), "https://example.com/data.csv");
1558
-
1557
+ ///
1559
1558
/// url.set_fragment(Some("cell=4,1-6,2"));
1560
1559
/// assert_eq!(url.as_str(), "https://example.com/data.csv#cell=4,1-6,2");
1561
1560
/// assert_eq!(url.fragment(), Some("cell=4,1-6,2"));
@@ -2674,8 +2673,7 @@ impl Url {
2674
2673
fragment_start,
2675
2674
} ;
2676
2675
if cfg ! ( debug_assertions) {
2677
- url. check_invariants ( )
2678
- . map_err ( |reason| Error :: custom ( reason) ) ?
2676
+ url. check_invariants ( ) . map_err ( Error :: custom) ?
2679
2677
}
2680
2678
Ok ( url)
2681
2679
}
@@ -2892,7 +2890,7 @@ impl<'de> serde::Deserialize<'de> for Url {
2892
2890
2893
2891
struct UrlVisitor ;
2894
2892
2895
- impl < ' de > Visitor < ' de > for UrlVisitor {
2893
+ impl Visitor < ' _ > for UrlVisitor {
2896
2894
type Value = Url ;
2897
2895
2898
2896
fn expecting ( & self , formatter : & mut fmt:: Formatter ) -> fmt:: Result {
@@ -3177,7 +3175,7 @@ impl<'a> form_urlencoded::Target for UrlQuery<'a> {
3177
3175
type Finished = & ' a mut Url ;
3178
3176
}
3179
3177
3180
- impl < ' a > Drop for UrlQuery < ' a > {
3178
+ impl Drop for UrlQuery < ' _ > {
3181
3179
fn drop ( & mut self ) {
3182
3180
if let Some ( url) = self . url . take ( ) {
3183
3181
url. restore_already_parsed_fragment ( self . fragment . take ( ) )
0 commit comments