Skip to content

Commit

Permalink
Fix tests with url crate update
Browse files Browse the repository at this point in the history
Works around servo/rust-url#577
  • Loading branch information
alexcrichton committed Jan 10, 2020
1 parent c95f396 commit dde2734
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cargo/util/canonical_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ impl CanonicalUrl {
// almost certainly not using the same case conversion rules that GitHub
// does. (See issue #84)
if url.host_str() == Some("github.com") {
url.set_scheme("https").unwrap();
url = format!("https{}", &url[url::Position::AfterScheme..])
.parse()
.unwrap();
let path = url.path().to_lowercase();
url.set_path(&path);
}
Expand Down

0 comments on commit dde2734

Please sign in to comment.