@@ -915,9 +915,10 @@ impl Url {
915
915
}
916
916
}
917
917
918
- /// Return the port number for this URL, if any. Note that default port numbers are never reflected
919
- /// by the serialization, use the `port_or_known_default()` method if you want a default port
920
- /// number returned.
918
+ /// Return the port number for this URL, if any.
919
+ ///
920
+ /// Note that default port numbers are never reflected by the serialization,
921
+ /// use the `port_or_known_default()` method if you want a default port number returned.
921
922
///
922
923
/// # Examples
923
924
///
@@ -930,7 +931,7 @@ impl Url {
930
931
/// assert_eq!(url.port(), None);
931
932
///
932
933
/// let url = Url::parse( "https://example.com:443/" )?;
933
- /// assert_eq!( url.port( ), None );
934
+ /// assert_eq!( url.port(), None );
934
935
///
935
936
/// let url = Url::parse("ssh://example.com:22")?;
936
937
/// assert_eq!(url.port(), Some(22));
@@ -1429,8 +1430,9 @@ impl Url {
1429
1430
self . serialization . push_str ( after_path)
1430
1431
}
1431
1432
1432
- /// Change this URL’s port number. Note that default port numbers are not reflected in the
1433
- /// serialization.
1433
+ /// Change this URL’s port number.
1434
+ ///
1435
+ /// Note that default port numbers are not reflected in the serialization.
1434
1436
///
1435
1437
/// If this URL is cannot-be-a-base, does not have a host, or has the `file` scheme;
1436
1438
/// do nothing and return `Err`.
0 commit comments