@@ -14,7 +14,7 @@ use cargo_test_support::paths;
1414use cargo_test_support:: prelude:: IntoData ;
1515use cargo_test_support:: prelude:: * ;
1616use cargo_test_support:: registry:: Package ;
17- use cargo_test_support:: { basic_lib_manifest, basic_manifest, git, main_file, path2url , project} ;
17+ use cargo_test_support:: { basic_lib_manifest, basic_manifest, git, main_file, project} ;
1818use cargo_test_support:: { sleep_ms, str, t, Project } ;
1919
2020#[ cargo_test]
@@ -878,7 +878,7 @@ fn dep_with_submodule() {
878878 let git_project2 = git:: new ( "dep2" , |project| project. file ( "lib.rs" , "pub fn dep() {}" ) ) ;
879879
880880 let repo = git2:: Repository :: open ( & git_project. root ( ) ) . unwrap ( ) ;
881- let url = path2url ( git_project2. root ( ) ) . to_string ( ) ;
881+ let url = git_project2. root ( ) . to_url ( ) . to_string ( ) ;
882882 git:: add_submodule ( & repo, & url, Path :: new ( "src" ) ) ;
883883 git:: commit ( & repo) ;
884884
@@ -1000,7 +1000,7 @@ fn dep_with_bad_submodule() {
10001000 let git_project2 = git:: new ( "dep2" , |project| project. file ( "lib.rs" , "pub fn dep() {}" ) ) ;
10011001
10021002 let repo = git2:: Repository :: open ( & git_project. root ( ) ) . unwrap ( ) ;
1003- let url = path2url ( git_project2. root ( ) ) . to_string ( ) ;
1003+ let url = git_project2. root ( ) . to_url ( ) . to_string ( ) ;
10041004 git:: add_submodule ( & repo, & url, Path :: new ( "src" ) ) ;
10051005 git:: commit ( & repo) ;
10061006
@@ -2441,12 +2441,12 @@ fn dont_require_submodules_are_checked_out() {
24412441 let git2 = git:: new ( "dep2" , |p| p) ;
24422442
24432443 let repo = git2:: Repository :: open ( & git1. root ( ) ) . unwrap ( ) ;
2444- let url = path2url ( git2. root ( ) ) . to_string ( ) ;
2444+ let url = git2. root ( ) . to_url ( ) . to_string ( ) ;
24452445 git:: add_submodule ( & repo, & url, Path :: new ( "a/submodule" ) ) ;
24462446 git:: commit ( & repo) ;
24472447
24482448 git2:: Repository :: init ( & p. root ( ) ) . unwrap ( ) ;
2449- let url = path2url ( git1. root ( ) ) . to_string ( ) ;
2449+ let url = git1. root ( ) . to_url ( ) . to_string ( ) ;
24502450 let dst = paths:: home ( ) . join ( "foo" ) ;
24512451 git2:: Repository :: clone ( & url, & dst) . unwrap ( ) ;
24522452
@@ -2863,7 +2863,7 @@ fn failed_submodule_checkout() {
28632863 drop ( ( repo, url) ) ;
28642864
28652865 let repo = git2:: Repository :: open ( & git_project. root ( ) ) . unwrap ( ) ;
2866- let url = path2url ( git_project2. root ( ) ) . to_string ( ) ;
2866+ let url = git_project2. root ( ) . to_url ( ) . to_string ( ) ;
28672867 git:: add_submodule ( & repo, & url, Path :: new ( "src" ) ) ;
28682868 git:: commit ( & repo) ;
28692869 drop ( repo) ;
@@ -3152,7 +3152,7 @@ fn dirty_submodule() {
31523152 project. no_manifest ( ) . file ( "lib.rs" , "pub fn f() {}" )
31533153 } ) ;
31543154
3155- let url = path2url ( git_project2. root ( ) ) . to_string ( ) ;
3155+ let url = git_project2. root ( ) . to_url ( ) . to_string ( ) ;
31563156 git:: add_submodule ( & repo, & url, Path :: new ( "src" ) ) ;
31573157
31583158 // Submodule added, but not committed.
@@ -3200,7 +3200,7 @@ to proceed despite this and include the uncommitted changes, pass the `--allow-d
32003200
32013201 // Try with a nested submodule.
32023202 let git_project3 = git:: new ( "bar" , |project| project. no_manifest ( ) . file ( "mod.rs" , "" ) ) ;
3203- let url = path2url ( git_project3. root ( ) ) . to_string ( ) ;
3203+ let url = git_project3. root ( ) . to_url ( ) . to_string ( ) ;
32043204 git:: add_submodule ( & sub_repo, & url, Path :: new ( "bar" ) ) ;
32053205 git_project
32063206 . cargo ( "package --no-verify" )
@@ -4085,7 +4085,7 @@ fn git_worktree_with_bare_original_repo() {
40854085 . bare ( true )
40864086 . clone_local ( git2:: build:: CloneLocal :: Local )
40874087 . clone (
4088- path2url ( git_project. root ( ) ) . as_str ( ) ,
4088+ git_project. root ( ) . to_url ( ) . as_str ( ) ,
40894089 & paths:: root ( ) . join ( "foo-bare" ) ,
40904090 )
40914091 . unwrap ( )
0 commit comments