Migrate from unmaintained tempdir to tempfile (#6476)

This commit is contained in:
Jonathan Tran
2025-04-25 17:19:04 -04:00
committed by GitHub
parent ffbe20b586
commit 6e7c44fca7
3 changed files with 3 additions and 22 deletions

21
rust/Cargo.lock generated
View File

@ -1920,7 +1920,7 @@ dependencies = [
"serde_json", "serde_json",
"sha2", "sha2",
"tabled", "tabled",
"tempdir", "tempfile",
"thiserror 2.0.12", "thiserror 2.0.12",
"tokio", "tokio",
"tokio-tungstenite", "tokio-tungstenite",
@ -3133,15 +3133,6 @@ version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 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]] [[package]]
name = "reqwest" name = "reqwest"
version = "0.12.15" version = "0.12.15"
@ -3837,16 +3828,6 @@ version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" 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]] [[package]]
name = "tempfile" name = "tempfile"
version = "3.19.0" version = "3.19.0"

View File

@ -69,7 +69,7 @@ serde = { workspace = true }
serde_json = { workspace = true } serde_json = { workspace = true }
sha2 = "0.10.8" sha2 = "0.10.8"
tabled = { version = "0.18.0", optional = true } tabled = { version = "0.18.0", optional = true }
tempdir = "0.3.7" tempfile = "3.19"
thiserror = "2.0.0" thiserror = "2.0.0"
toml = "0.8.19" toml = "0.8.19"
ts-rs = { version = "10.1.0", features = [ ts-rs = { version = "10.1.0", features = [

View File

@ -2719,7 +2719,7 @@ d = b + c
.parse_errs_as_err() .parse_errs_as_err()
.unwrap(); .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")) tokio::fs::File::create(tmpdir.path().join("main.kcl"))
.await .await