Skip to content

Commit

Permalink
Replace dependency tempdir with tempfile
Browse files Browse the repository at this point in the history
The crate tempdir was deprecated and merged into tempfile.
(Stebalien/tempfile#43)
  • Loading branch information
jurodr committed Sep 29, 2020
1 parent b743b41 commit afb6373
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ mio = { version = "0.6", optional = true }
tokio = { version = "0.2.2", optional = true, features = ["io-driver"] }

[dev-dependencies]
tempdir = "0.3"
tempfile = "3.1.0"
futures-util = "0.3.1"
tokio = { version = "0.2.1", features = ["macros", "rt-core"] }

Expand Down
4 changes: 2 additions & 2 deletions examples/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ use inotify::{
Inotify,
WatchMask,
};
use tempdir::TempDir;
use tempfile::TempDir;

#[tokio::main]
async fn main() -> Result<(), io::Error> {
let mut inotify = Inotify::init()
.expect("Failed to initialize inotify");

let dir = TempDir::new("inotify-rs-test")?;
let dir = TempDir::new()?;

inotify.add_watch(dir.path(), WatchMask::CREATE | WatchMask::MODIFY)?;

Expand Down
4 changes: 2 additions & 2 deletions tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::os::unix::io::{
IntoRawFd,
};
use std::path::PathBuf;
use tempdir::TempDir;
use tempfile::TempDir;


#[test]
Expand Down Expand Up @@ -238,7 +238,7 @@ struct TestDir {
impl TestDir {
fn new() -> TestDir {
TestDir {
dir: TempDir::new("inotify-rs-test").unwrap(),
dir: TempDir::new().unwrap(),
counter: 0,
}
}
Expand Down

0 comments on commit afb6373

Please sign in to comment.