diff --git a/Cargo.lock b/Cargo.lock index 32c7b707..5788cd29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -181,7 +181,7 @@ dependencies = [ "schemars", "semver", "serde_json", - "tempdir", + "tempfile", "typify", ] @@ -418,12 +418,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - [[package]] name = "gimli" version = "0.28.1" @@ -721,43 +715,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -dependencies = [ - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "rdrand", - "winapi", -] - -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -806,15 +763,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - [[package]] name = "rustc-demangle" version = "0.1.24" @@ -1043,16 +991,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "591ef38edfb78ca4771ee32cf494cb8771944bee237a9b91fc9c1424ac4b777b" -[[package]] -name = "tempdir" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -dependencies = [ - "rand", - "remove_dir_all", -] - [[package]] name = "tempfile" version = "3.8.1" diff --git a/Cargo.toml b/Cargo.toml index e1c0f640..2cf9a416 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,7 @@ semver = "1.0.28" serde = "1.0.228" serde_json = "1.0.149" syn = { version = "2.0.117", features = ["full"] } -tempdir = "0.3.7" +tempfile = "3.8.1" thiserror = "2.0.18" trybuild = "1.0.116" unicode-ident = "1.0.24" diff --git a/cargo-typify/Cargo.toml b/cargo-typify/Cargo.toml index ff29f5da..b56d7345 100644 --- a/cargo-typify/Cargo.toml +++ b/cargo-typify/Cargo.toml @@ -26,4 +26,4 @@ schemars = { workspace = true } assert_cmd = { workspace = true } expectorate = { workspace = true } newline-converter = { workspace = true } -tempdir = { workspace = true } +tempfile = { workspace = true } diff --git a/cargo-typify/tests/integration.rs b/cargo-typify/tests/integration.rs index 267994d1..70e238be 100644 --- a/cargo-typify/tests/integration.rs +++ b/cargo-typify/tests/integration.rs @@ -1,12 +1,12 @@ use expectorate::assert_contents; use newline_converter::dos2unix; -use tempdir::TempDir; +use tempfile::TempDir; #[test] fn test_simple() { let input = concat!(env!("CARGO_MANIFEST_DIR"), "/../example.json"); - let temp = TempDir::new("cargo-typify").unwrap(); + let temp = TempDir::new().unwrap(); let input_file = temp.path().join("simple.json"); std::fs::copy(input, &input_file).unwrap(); @@ -26,7 +26,7 @@ fn test_simple() { fn test_default_output() { let input = concat!(env!("CARGO_MANIFEST_DIR"), "/../example.json"); - let temp = TempDir::new("cargo-typify").unwrap(); + let temp = TempDir::new().unwrap(); let output_file = temp.path().join("output.rs"); assert_cmd::cargo::cargo_bin_cmd!() @@ -59,7 +59,7 @@ fn test_no_builder_stdout() { fn test_builder() { let input = concat!(env!("CARGO_MANIFEST_DIR"), "/../example.json"); - let temp = TempDir::new("cargo-typify").unwrap(); + let temp = TempDir::new().unwrap(); let output_file = temp.path().join("output.rs"); assert_cmd::cargo::cargo_bin_cmd!() @@ -82,7 +82,7 @@ fn test_builder() { fn test_derive() { let input = concat!(env!("CARGO_MANIFEST_DIR"), "/../example.json"); - let temp = TempDir::new("cargo-typify").unwrap(); + let temp = TempDir::new().unwrap(); let output_file = temp.path().join("output.rs"); assert_cmd::cargo::cargo_bin_cmd!() @@ -107,7 +107,7 @@ fn test_derive() { fn test_attr() { let input = concat!(env!("CARGO_MANIFEST_DIR"), "/../example.json"); - let temp = TempDir::new("cargo-typify").unwrap(); + let temp = TempDir::new().unwrap(); let output_file = temp.path().join("output.rs"); assert_cmd::cargo::cargo_bin_cmd!() @@ -132,7 +132,7 @@ fn test_attr() { fn test_multi_derive() { let input = concat!(env!("CARGO_MANIFEST_DIR"), "/../example.json"); - let temp = TempDir::new("cargo-typify").unwrap(); + let temp = TempDir::new().unwrap(); let output_file = temp.path().join("output.rs"); assert_cmd::cargo::cargo_bin_cmd!() @@ -173,7 +173,7 @@ fn test_help() { fn test_btree_map() { let input = concat!(env!("CARGO_MANIFEST_DIR"), "/../example.json"); - let temp = TempDir::new("cargo-typify").unwrap(); + let temp = TempDir::new().unwrap(); let output_file = temp.path().join("output.rs"); assert_cmd::cargo::cargo_bin_cmd!()