We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
unwrap
1 parent 0dfc893 commit 11935acCopy full SHA for 11935ac
src/lib.rs
@@ -267,12 +267,12 @@ impl Url {
267
/// ```rust
268
/// use url::Url;
269
///
270
- /// let base = Url::parse("https://example.net/a/b.html").unwrap();
271
- /// let url = base.join("c.png").unwrap();
+ /// let base = Url::parse("https://example.net/a/b.html")?;
+ /// let url = base.join("c.png")?;
272
/// assert_eq!(url.as_str(), "https://example.net/a/c.png"); // Not /a/b.html/c.png
273
274
- /// let base = Url::parse("https://example.net/a/b/").unwrap();
275
+ /// let base = Url::parse("https://example.net/a/b/")?;
276
/// assert_eq!(url.as_str(), "https://example.net/a/b/c.png");
277
/// ```
278
#[inline]
0 commit comments