Browse Source

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

Corey Farwell 9 years ago
parent
commit
312495c1f4
1 changed files with 3 additions and 0 deletions
  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"));
     /// ```