From 269ab866f147c5eec4ab81e35ec0db11a2ea6ffb Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 8 Oct 2023 13:03:22 +0200 Subject: refactor(tvix/eval/tests): migrate to tempfile tempdir pulls in remove_dir_all 0.5.3 with https://rustsec.org/advisories/RUSTSEC-2023-0018.html, and we use tempfile everywhere else too, so let's just migrate to that. Change-Id: I735ade7b65e12fc26e3d43ca95fcfa07fcc64642 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9565 Reviewed-by: Connor Brewster Autosubmit: flokli Tested-by: BuildkiteCI --- tvix/eval/Cargo.toml | 2 +- tvix/eval/tests/nix_oracle.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'tvix/eval') diff --git a/tvix/eval/Cargo.toml b/tvix/eval/Cargo.toml index cd5af7709c71..2098d470619a 100644 --- a/tvix/eval/Cargo.toml +++ b/tvix/eval/Cargo.toml @@ -35,7 +35,7 @@ xml-rs = "0.8.4" criterion = "0.4" pretty_assertions = "1.2.1" itertools = "0.10.3" -tempdir = "0.3.7" +tempfile = "3.3.0" [dev-dependencies.test-generator] # This fork of test-generator adds support for cargo workspaces, see diff --git a/tvix/eval/tests/nix_oracle.rs b/tvix/eval/tests/nix_oracle.rs index e8bd004f1d14..b777d289e03b 100644 --- a/tvix/eval/tests/nix_oracle.rs +++ b/tvix/eval/tests/nix_oracle.rs @@ -3,7 +3,6 @@ use std::{env, path::PathBuf, process::Command}; use pretty_assertions::assert_eq; -use tempdir::TempDir; fn nix_binary_path() -> PathBuf { env::var("NIX_INSTANTIATE_BINARY_PATH") @@ -18,7 +17,7 @@ enum Strictness { } fn nix_eval(expr: &str, strictness: Strictness) -> String { - let store_dir = TempDir::new("store-dir").unwrap(); + let store_dir = tempfile::tempdir().unwrap(); let mut args = match strictness { Strictness::Lazy => vec![], -- cgit 1.4.1