Skip to content

Commit e5bfb43

Browse files
author
Fantayeneh Asres Gizaw
committed
replace tempdir
1 parent 1cf0f30 commit e5bfb43

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ categories = ["filesystem"]
1313
rust-version = "1.23.0"
1414

1515
[dev-dependencies]
16-
# FIXME: This should be replaced by `tempfile`
17-
tempdir = "0.3"
1816
doc-comment = "0.3"
17+
tempfile = "3.4.0"

tests/glob-std.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
#![cfg_attr(test, deny(warnings))]
1414

1515
extern crate glob;
16-
extern crate tempdir;
16+
extern crate tempfile;
1717

1818
use glob::{glob, glob_with};
1919
use std::env;
2020
use std::fs;
2121
use std::path::PathBuf;
22-
use tempdir::TempDir;
22+
use tempfile::TempDir;
2323

2424
#[test]
2525
fn main() {
@@ -68,8 +68,7 @@ fn main() {
6868
.collect()
6969
}
7070

71-
let root = TempDir::new("glob-tests");
72-
let root = root.ok().expect("Should have created a temp directory");
71+
let root = TempDir::new().expect("Should have created a temp directory");
7372
assert!(env::set_current_dir(root.path()).is_ok());
7473

7574
mk_file("aaa", true);

0 commit comments

Comments
 (0)