Skip to content

Commit 7861920

Browse files
committed
url: fix warnings from doc tests
1 parent 3cc7e69 commit 7861920

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

url/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ impl Url {
10571057
/// use url::Url;
10581058
/// # use std::error::Error;
10591059
///
1060-
/// # fn run() -> Result<(), Box<Error>> {
1060+
/// # fn run() -> Result<(), Box<dyn Error>> {
10611061
/// let url = Url::parse("https://example.com/foo/bar")?;
10621062
/// let mut path_segments = url.path_segments().ok_or_else(|| "cannot be base")?;
10631063
/// assert_eq!(path_segments.next(), Some("foo"));
@@ -1450,7 +1450,7 @@ impl Url {
14501450
/// use url::Url;
14511451
/// # use std::error::Error;
14521452
///
1453-
/// # fn run() -> Result<(), Box<Error>> {
1453+
/// # fn run() -> Result<(), Box<dyn Error>> {
14541454
/// let mut url = Url::parse("ssh://example.net:2048/")?;
14551455
///
14561456
/// url.set_port(Some(4096)).map_err(|_| "cannot be base")?;
@@ -1469,7 +1469,7 @@ impl Url {
14691469
/// use url::Url;
14701470
/// # use std::error::Error;
14711471
///
1472-
/// # fn run() -> Result<(), Box<Error>> {
1472+
/// # fn run() -> Result<(), Box<dyn Error>> {
14731473
/// let mut url = Url::parse("https://example.org/")?;
14741474
///
14751475
/// url.set_port(Some(443)).map_err(|_| "cannot be base")?;

url/src/path_segments.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use std::str;
2121
/// use url::Url;
2222
/// # use std::error::Error;
2323
///
24-
/// # fn run() -> Result<(), Box<Error>> {
24+
/// # fn run() -> Result<(), Box<dyn Error>> {
2525
/// let mut url = Url::parse("mailto:me@example.com")?;
2626
/// assert!(url.path_segments_mut().is_err());
2727
///
@@ -80,7 +80,7 @@ impl<'a> PathSegmentsMut<'a> {
8080
/// use url::Url;
8181
/// # use std::error::Error;
8282
///
83-
/// # fn run() -> Result<(), Box<Error>> {
83+
/// # fn run() -> Result<(), Box<dyn Error>> {
8484
/// let mut url = Url::parse("https://github.com/servo/rust-url/")?;
8585
/// url.path_segments_mut().map_err(|_| "cannot be base")?
8686
/// .clear().push("logout");
@@ -108,7 +108,7 @@ impl<'a> PathSegmentsMut<'a> {
108108
/// use url::Url;
109109
/// # use std::error::Error;
110110
///
111-
/// # fn run() -> Result<(), Box<Error>> {
111+
/// # fn run() -> Result<(), Box<dyn Error>> {
112112
/// let mut url = Url::parse("https://github.com/servo/rust-url/")?;
113113
/// url.path_segments_mut().map_err(|_| "cannot be base")?
114114
/// .push("pulls");
@@ -177,7 +177,7 @@ impl<'a> PathSegmentsMut<'a> {
177177
/// use url::Url;
178178
/// # use std::error::Error;
179179
///
180-
/// # fn run() -> Result<(), Box<Error>> {
180+
/// # fn run() -> Result<(), Box<dyn Error>> {
181181
/// let mut url = Url::parse("https://github.com/")?;
182182
/// let org = "servo";
183183
/// let repo = "rust-url";
@@ -197,7 +197,7 @@ impl<'a> PathSegmentsMut<'a> {
197197
/// use url::Url;
198198
/// # use std::error::Error;
199199
///
200-
/// # fn run() -> Result<(), Box<Error>> {
200+
/// # fn run() -> Result<(), Box<dyn Error>> {
201201
/// let mut url = Url::parse("https://github.com/servo")?;
202202
/// url.path_segments_mut().map_err(|_| "cannot be base")?
203203
/// .extend(&["..", "rust-url", ".", "pulls"]);

0 commit comments

Comments
 (0)