@@ -915,9 +915,10 @@ impl Url {
915915 }
916916 }
917917
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.
921922 ///
922923 /// # Examples
923924 ///
@@ -930,7 +931,7 @@ impl Url {
930931 /// assert_eq!(url.port(), None);
931932 ///
932933 /// let url = Url::parse( "https://example.com:443/" )?;
933- /// assert_eq!( url.port( ), None );
934+ /// assert_eq!( url.port(), None );
934935 ///
935936 /// let url = Url::parse("ssh://example.com:22")?;
936937 /// assert_eq!(url.port(), Some(22));
@@ -1429,8 +1430,9 @@ impl Url {
14291430 self . serialization . push_str ( after_path)
14301431 }
14311432
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.
14341436 ///
14351437 /// If this URL is cannot-be-a-base, does not have a host, or has the `file` scheme;
14361438 /// do nothing and return `Err`.
0 commit comments