Skip to content

Commit 1814ca5

Browse files
committed
Auto merge of #7787 - alexcrichton:fix-tests, r=alexcrichton
Fix tests with `url` crate update Works around servo/rust-url#577
2 parents 6dd57b2 + dde2734 commit 1814ca5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cargo/util/canonical_url.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ impl CanonicalUrl {
3939
// almost certainly not using the same case conversion rules that GitHub
4040
// does. (See issue #84)
4141
if url.host_str() == Some("github.com") {
42-
url.set_scheme("https").unwrap();
42+
url = format!("https{}", &url[url::Position::AfterScheme..])
43+
.parse()
44+
.unwrap();
4345
let path = url.path().to_lowercase();
4446
url.set_path(&path);
4547
}

0 commit comments

Comments
 (0)