Преглед изворни кода

Add interesting case for `url::Url::domain` doc examples.

Corey Farwell пре 9 година
родитељ
комит
312495c1f4
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      src/lib.rs

+ 3 - 0
src/lib.rs

@@ -694,6 +694,9 @@ impl Url {
     /// let url = Url::parse("https://127.0.0.1/").unwrap();
     /// assert_eq!(url.domain(), None);
     ///
+    /// let url = Url::parse("mailto:rms@example.net").unwrap();
+    /// assert_eq!(url.domain(), None);
+    ///
     /// let url = Url::parse("https://example.com/").unwrap();
     /// assert_eq!(url.domain(), Some("example.com"));
     /// ```