From 69bfde9e5e45e5edf4333de472193b9ec60f628d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kj=C3=A4ll?= Date: Tue, 19 Apr 2022 18:05:11 +0200 Subject: [PATCH] replace tempdir crate with tempfile, as tempfile have superseded tempdir --- include_dir/Cargo.toml | 2 +- include_dir/tests/integration_test.rs | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/include_dir/Cargo.toml b/include_dir/Cargo.toml index 2881f8ab1..c4ecd8de6 100644 --- a/include_dir/Cargo.toml +++ b/include_dir/Cargo.toml @@ -16,7 +16,7 @@ glob = { version = "0.3", optional = true } include_dir_macros = { version = "^0.7.0", path = "../macros" } [dev-dependencies] -tempdir = "0.3" +tempfile = "3" [features] default = [] diff --git a/include_dir/tests/integration_test.rs b/include_dir/tests/integration_test.rs index b51ecd35b..3370a8793 100644 --- a/include_dir/tests/integration_test.rs +++ b/include_dir/tests/integration_test.rs @@ -1,6 +1,6 @@ use include_dir::{include_dir, Dir}; use std::path::Path; -use tempdir::TempDir; +use tempfile::TempDir; static PARENT_DIR: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR"); @@ -14,15 +14,7 @@ fn included_all_files_in_the_include_dir_crate() { #[test] fn extract_all_files() { - let tmpdir = TempDir::new( - format!( - "{}-{}-test", - env!("CARGO_PKG_NAME"), - env!("CARGO_PKG_VERSION") - ) - .as_str(), - ) - .unwrap(); + let tmpdir = TempDir::new().unwrap(); let root = tmpdir.path(); PARENT_DIR.extract(root).unwrap();