Skip to content

Commit e9838b0

Browse files
committed
Update example code to correctly reflect implementation
1 parent 43b2222 commit e9838b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,11 +1762,11 @@ impl Url {
17621762
/// use url::{Url, ParseError};
17631763
///
17641764
/// # fn run() -> Result<(), ParseError> {
1765-
/// let mut url = Url::parse("ftp://:secre1@example.com")?;
1765+
/// let mut url = Url::parse("ftp://:secre1@example.com/")?;
17661766
/// let result = url.set_username("user1");
17671767
/// assert!(result.is_ok());
17681768
/// assert_eq!(url.username(), "user1");
1769-
/// assert_eq!(url.as_str(), "ftp://user1:secre1@example.com");
1769+
/// assert_eq!(url.as_str(), "ftp://user1:secre1@example.com/");
17701770
/// # Ok(())
17711771
/// # }
17721772
/// # run().unwrap();

0 commit comments

Comments
 (0)