Просмотр исходного кода

url: update comments to remove mentions of gopher scheme

Following changes in 2f204d0037882d742c4f9c6660356967982219d6, the
gopher scheme is no longer recognized.
Dirkjan Ochtman 6 лет назад
Родитель
Сommit
0587063a9f
3 измененных файлов с 5 добавлено и 5 удалено
  1. 3 3
      url/src/lib.rs
  2. 1 1
      url/src/origin.rs
  3. 1 1
      url/src/parser.rs

+ 3 - 3
url/src/lib.rs

@@ -927,7 +927,7 @@ impl Url {
     /// Return the port number for this URL, or the default port number if it is known.
     ///
     /// This method only knows the default port number
-    /// of the `http`, `https`, `ws`, `wss`, `ftp`, and `gopher` schemes.
+    /// of the `http`, `https`, `ws`, `wss` and `ftp` schemes.
     ///
     /// For URLs in these schemes, this method always returns `Some(_)`.
     /// For other schemes, it is the same as `Url::port()`.
@@ -1956,9 +1956,9 @@ impl Url {
     ///
     /// * If the new scheme is not in `[a-zA-Z][a-zA-Z0-9+.-]+`
     /// * If this URL is cannot-be-a-base and the new scheme is one of
-    ///   `http`, `https`, `ws`, `wss`, `ftp`, or `gopher`
+    ///   `http`, `https`, `ws`, `wss` or `ftp`
     /// * If either the old or new scheme is `http`, `https`, `ws`,
-    ///   `wss`, `ftp`, or `gopher` and the other is not one of these
+    ///   `wss` or `ftp` and the other is not one of these
     /// * If the new scheme is `file` and this URL includes credentials
     ///   or has a non-null port
     /// * If this URL's scheme is `file` and its host is empty or null

+ 1 - 1
url/src/origin.rs

@@ -44,7 +44,7 @@ pub fn url_origin(url: &Url) -> Origin {
 /// - If the scheme is "blob" the origin is the origin of the
 ///   URL contained in the path component. If parsing fails,
 ///   it is an opaque origin.
-/// - If the scheme is "ftp", "gopher", "http", "https", "ws", or "wss",
+/// - If the scheme is "ftp", "http", "https", "ws", or "wss",
 ///   then the origin is a tuple of the scheme, host, and port.
 /// - If the scheme is anything else, the origin is opaque, meaning
 ///   the URL does not have the same origin as any other URL.

+ 1 - 1
url/src/parser.rs

@@ -466,7 +466,7 @@ impl<'a> Parser<'a> {
         }
     }
 
-    /// Scheme other than file, http, https, ws, ws, ftp, gopher.
+    /// Scheme other than file, http, https, ws, ws, ftp.
     fn parse_non_special(
         mut self,
         input: Input,