From 6be02209672e4bcd8cf96cb417216a0abe1b4fe3 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Sat, 14 Mar 2020 15:17:52 +0000 Subject: [PATCH] Use `into_path` --- tests/integration.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index 00eb140544f..8cc78c98a65 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -12,10 +12,8 @@ fn integration_test() { .nth(1) .expect("repo name should have format `/`"); - let repo_dir = tempfile::tempdir() - .expect("couldn't create temp dir") - .path() - .join(crate_name); + let mut repo_dir = tempfile::tempdir().expect("couldn't create temp dir").into_path(); + repo_dir.push(crate_name); let st = Command::new("git") .args(&["clone", "--depth=1", &repo_url, repo_dir.to_str().unwrap()])