Skip to content

Commit 3dfc08f

Browse files
authored
Update Url::domain docs to show that it includes subdomain
Signed-off-by: supercoolspy <[email protected]>
1 parent dbd5261 commit 3dfc08f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

url/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,10 @@ impl Url {
12231223
///
12241224
/// let url = Url::parse("https://example.com/")?;
12251225
/// assert_eq!(url.domain(), Some("example.com"));
1226+
///
1227+
/// let url = Url::parse("https://subdomain.example.com/")?;
1228+
/// assert_eq!(url.domain(), Some("subdomain.example.com"));
1229+
///
12261230
/// # Ok(())
12271231
/// # }
12281232
/// # run().unwrap();

0 commit comments

Comments
 (0)