Use into_path

This commit is contained in:
Lzu Tao 2020-03-14 15:17:52 +00:00
parent 29df0139dc
commit 6be0220967

View File

@ -12,10 +12,8 @@ fn integration_test() {
.nth(1) .nth(1)
.expect("repo name should have format `<org>/<name>`"); .expect("repo name should have format `<org>/<name>`");
let repo_dir = tempfile::tempdir() let mut repo_dir = tempfile::tempdir().expect("couldn't create temp dir").into_path();
.expect("couldn't create temp dir") repo_dir.push(crate_name);
.path()
.join(crate_name);
let st = Command::new("git") let st = Command::new("git")
.args(&["clone", "--depth=1", &repo_url, repo_dir.to_str().unwrap()]) .args(&["clone", "--depth=1", &repo_url, repo_dir.to_str().unwrap()])