diff --git a/rust/Cargo.lock b/rust/Cargo.lock index e03ec93ba..6028d2d14 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1920,7 +1920,7 @@ dependencies = [ "serde_json", "sha2", "tabled", - "tempdir", + "tempfile", "thiserror 2.0.12", "tokio", "tokio-tungstenite", @@ -3133,15 +3133,6 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" -[[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 = "reqwest" version = "0.12.15" @@ -3837,16 +3828,6 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" -[[package]] -name = "tempdir" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -dependencies = [ - "rand 0.4.6", - "remove_dir_all", -] - [[package]] name = "tempfile" version = "3.19.0" diff --git a/rust/kcl-lib/Cargo.toml b/rust/kcl-lib/Cargo.toml index d9343e777..7953b10af 100644 --- a/rust/kcl-lib/Cargo.toml +++ b/rust/kcl-lib/Cargo.toml @@ -69,7 +69,7 @@ serde = { workspace = true } serde_json = { workspace = true } sha2 = "0.10.8" tabled = { version = "0.18.0", optional = true } -tempdir = "0.3.7" +tempfile = "3.19" thiserror = "2.0.0" toml = "0.8.19" ts-rs = { version = "10.1.0", features = [ diff --git a/rust/kcl-lib/src/execution/exec_ast.rs b/rust/kcl-lib/src/execution/exec_ast.rs index e60c14869..df7ead0ee 100644 --- a/rust/kcl-lib/src/execution/exec_ast.rs +++ b/rust/kcl-lib/src/execution/exec_ast.rs @@ -2719,7 +2719,7 @@ d = b + c .parse_errs_as_err() .unwrap(); - let tmpdir = tempdir::TempDir::new("zma_kcl_load_all_modules").unwrap(); + let tmpdir = tempfile::TempDir::with_prefix("zma_kcl_load_all_modules").unwrap(); tokio::fs::File::create(tmpdir.path().join("main.kcl")) .await