Skip to content

Commit e5fdd48

Browse files
committed
Auto merge of #9475 - PaulDance:fix-test-support-warning, r=ehuss
Fix Url::into_string deprecation warning ```rust warning: use of deprecated associated function `url::Url::into_string`: use Into<String> --> src/registry.rs:183:26 | 183 | dl_url().into_string(), | ^^^^^^^^^^^ | = note: `#[warn(deprecated)]` on by default ``` is being emitted when running `cargo build` directly from the `crates/cargo-test-support` or the `crates/mdman` crate. This simply proposes a switch to the recommended method in order to resolve the deprecation warning.
2 parents 5c45513 + a5b4b47 commit e5fdd48

File tree

6 files changed

+18
-12
lines changed

6 files changed

+18
-12
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ tempfile = "3.0"
6161
termcolor = "1.1"
6262
toml = "0.5.7"
6363
unicode-xid = "0.2.0"
64-
url = "2.0"
64+
url = "2.2.2"
6565
walkdir = "2.2"
6666
clap = "2.31.2"
6767
unicode-width = "0.1.5"

crates/cargo-test-support/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ remove_dir_all = "0.5"
2121
serde_json = "1.0"
2222
tar = { version = "0.4.18", default-features = false }
2323
toml = "0.5.7"
24-
url = "2.0"
24+
url = "2.2.2"

crates/cargo-test-support/src/registry.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,7 @@ impl RegistryBuilder {
178178
}
179179

180180
if self.replace_crates_io {
181-
init_registry(
182-
registry_path(),
183-
dl_url().into_string(),
184-
api_url(),
185-
api_path(),
186-
);
181+
init_registry(registry_path(), dl_url().into(), api_url(), api_path());
187182
}
188183

189184
if self.alternative {

crates/mdman/Cargo.lock

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/mdman/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ handlebars = { version = "3.2.1", features = ["dir_source"] }
1212
pulldown-cmark = { version = "0.7.2", default-features = false }
1313
same-file = "1.0.6"
1414
serde_json = "1.0.56"
15-
url = "2.1.1"
15+
url = "2.2.2"
1616

1717
[dev-dependencies]
1818
pretty_assertions = "0.6.1"

crates/mdman/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ fn join_url<'a>(base: Option<&Url>, dest: CowStr<'a>) -> CowStr<'a> {
9696
let joined = base_url.join(&dest).unwrap_or_else(|e| {
9797
panic!("failed to join URL `{}` to `{}`: {}", dest, base_url, e)
9898
});
99-
joined.into_string().into()
99+
String::from(joined).into()
100100
}
101101
}
102102
None => dest,

0 commit comments

Comments
 (0)