Skip to content

Commit 255a0de

Browse files
committed
Fix test for Windows
1 parent aba673d commit 255a0de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/cargotest/support/registry.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ pub fn alt_registry_path() -> PathBuf { paths::root().join("alternative-registry
2222
pub fn alt_registry() -> Url { Url::from_file_path(&*alt_registry_path()).ok().unwrap() }
2323
pub fn alt_dl_path() -> PathBuf { paths::root().join("alt_dl") }
2424
pub fn alt_dl_url() -> String {
25-
format!("file://{}/{{crate}}/{{version}}/{{crate}}-{{version}}.crate", alt_dl_path().display())
25+
let base = Url::from_file_path(&*alt_dl_path()).ok().unwrap();
26+
format!("{}/{{crate}}/{{version}}/{{crate}}-{{version}}.crate", base)
2627
}
2728
pub fn alt_api_path() -> PathBuf { paths::root().join("alt_api") }
2829
pub fn alt_api_url() -> Url { Url::from_file_path(&*alt_api_path()).ok().unwrap() }

0 commit comments

Comments
 (0)