mirror of
https://github.com/openharmony/third_party_rust_which-rs.git
synced 2026-07-01 21:14:07 -04:00
Merge pull request #53 from alexanderkjall/replace-tempdir-with-tempfile
Replace tempdir with tempfile
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ regex = { version = "1.5.4", optional = true }
|
||||
lazy_static = "1"
|
||||
|
||||
[dev-dependencies]
|
||||
tempdir = "0.3.7"
|
||||
tempfile = "3"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
||||
+2
-3
@@ -1,4 +1,3 @@
|
||||
extern crate tempdir;
|
||||
extern crate which;
|
||||
|
||||
#[cfg(all(unix, feature = "regex"))]
|
||||
@@ -8,7 +7,7 @@ use std::fs;
|
||||
use std::io;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::{env, vec};
|
||||
use tempdir::TempDir;
|
||||
use tempfile::TempDir;
|
||||
|
||||
struct TestFixture {
|
||||
/// Temp directory.
|
||||
@@ -55,7 +54,7 @@ impl TestFixture {
|
||||
// tmp/c/bin.exe
|
||||
// tmp/c/bin.cmd
|
||||
pub fn new() -> TestFixture {
|
||||
let tempdir = TempDir::new("which_tests").unwrap();
|
||||
let tempdir = tempfile::tempdir().unwrap();
|
||||
let mut builder = fs::DirBuilder::new();
|
||||
builder.recursive(true);
|
||||
let mut paths = vec![];
|
||||
|
||||
Reference in New Issue
Block a user