Skip to content

Commit

Permalink
Replace tempdir with tempfile, as the tempdir crate have been superce…
Browse files Browse the repository at this point in the history
…ded by tempfile
  • Loading branch information
alexanderkjall authored and Alexander Kjäll committed Feb 7, 2022
1 parent 688ec70 commit 894cbdb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -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
5 changes: 2 additions & 3 deletions tests/basic.rs
@@ -1,4 +1,3 @@
extern crate tempdir;
extern crate which;

#[cfg(all(unix, feature = "regex"))]
Expand All @@ -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.
Expand Down Expand Up @@ -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![];
Expand Down

0 comments on commit 894cbdb

Please sign in to comment.