Skip to content

Commit 4704525

Browse files
author
bors-servo
authored
Auto merge of #389 - maghoff:patch-1, r=SimonSapin
Add missing whitespace Without this whitespace, the example code would be rendered as paragraph text. This change fixes it so the example code is rendered as code. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/389) <!-- Reviewable:end -->
2 parents b8d3c15 + e9838b0 commit 4704525

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1757,15 +1757,16 @@ impl Url {
17571757
/// ```
17581758
///
17591759
/// Setup username to user1
1760+
///
17601761
/// ```rust
17611762
/// use url::{Url, ParseError};
17621763
///
17631764
/// # fn run() -> Result<(), ParseError> {
1764-
/// let mut url = Url::parse("ftp://:secre1@example.com")?;
1765+
/// let mut url = Url::parse("ftp://:secre1@example.com/")?;
17651766
/// let result = url.set_username("user1");
17661767
/// assert!(result.is_ok());
17671768
/// assert_eq!(url.username(), "user1");
1768-
/// assert_eq!(url.as_str(), "ftp://user1:secre1@example.com");
1769+
/// assert_eq!(url.as_str(), "ftp://user1:secre1@example.com/");
17691770
/// # Ok(())
17701771
/// # }
17711772
/// # run().unwrap();

0 commit comments

Comments
 (0)