Skip to content

Commit

Permalink
Merge pull request #65 from naglis/use-tempfile-crate
Browse files Browse the repository at this point in the history
Use `tempfile` crate instead of `tempdir`
  • Loading branch information
kstep authored Dec 12, 2023
2 parents 39b974b + efaae61 commit 6ec7da3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ serde = { version = "1", features = ["derive"], optional = true }
serde_repr = { version = "0.1", optional = true }

[dev-dependencies]
tempdir = "0.3.5"
tempfile = "3.8.1"

[features]
serde = ["dep:serde", "dep:serde_repr"]
6 changes: 3 additions & 3 deletions tests/helpers/daemon.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extern crate tempdir;
extern crate tempfile;

use self::tempdir::TempDir;
use self::tempfile::TempDir;
use super::mpd;
use std::fs::{create_dir, File};
use std::io::{Read, Write};
Expand Down Expand Up @@ -92,7 +92,7 @@ static EMPTY_FLAC_BYTES: &[u8] = include_bytes!("../data/empty.flac");

impl Daemon {
pub fn start() -> Daemon {
let temp_dir = TempDir::new("mpd-test").unwrap();
let temp_dir = TempDir::with_prefix("mpd-test").unwrap();
let config = MpdConfig::new(&temp_dir);
config.generate();

Expand Down

0 comments on commit 6ec7da3

Please sign in to comment.