We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8c5cc14 + ee9a64b commit 9f7e2d4Copy full SHA for 9f7e2d4
tests/mock/clitools.rs
@@ -81,11 +81,15 @@ pub fn setup(s: Scenario, f: &dyn Fn(&mut Config)) {
81
}
82
let test_dir = exe_dir.parent().unwrap().join("tests");
83
fs::create_dir_all(&test_dir).unwrap();
84
+ let test_dir = tempfile::Builder::new()
85
+ .prefix("running-test-")
86
+ .tempdir_in(test_dir)
87
+ .unwrap();
88
- fn tempdir_in_with_prefix(path: &Path, prefix: &str) -> PathBuf {
89
+ fn tempdir_in_with_prefix<P: AsRef<Path>>(path: P, prefix: &str) -> PathBuf {
90
tempfile::Builder::new()
91
.prefix(prefix)
- .tempdir_in(path)
92
+ .tempdir_in(path.as_ref())
93
.unwrap()
94
.into_path()
95
0 commit comments