Skip to content

Commit b5fe5a1

Browse files
Replace tempdir with tempfile (#176)
The tempdir crate has been superseded by tempfile.
1 parent 952da29 commit b5fe5a1

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
channel:
2121
- stable
2222
- nightly
23-
- 1.63.0 # MSRV of test dependencies
23+
- 1.71.0 # MSRV of test dependencies
2424
os:
2525
- macos-13 # x86 MacOS
2626
- macos-15 # Arm MacOS

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.63.0"
1414

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

tests/glob-std.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@
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;
2322

2423
#[test]
2524
fn main() {
@@ -68,8 +67,8 @@ fn main() {
6867
.collect()
6968
}
7069

71-
let root = TempDir::new("glob-tests");
72-
let root = root.ok().expect("Should have created a temp directory");
70+
let root = tempfile::tempdir();
71+
let root = root.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)