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 <cbrewster@hey.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2023-10-08 13:03:22 +02:00 committed by clbot
parent 4b27cdbc57
commit 269ab866f1
4 changed files with 22 additions and 237 deletions

View file

@ -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![],