about summary refs log tree commit diff
path: root/tvix/eval
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-10-08T11·03+0200
committerclbot <clbot@tvl.fyi>2023-10-08T22·47+0000
commit269ab866f147c5eec4ab81e35ec0db11a2ea6ffb (patch)
tree7ea96ff1fa305f81184fc7cc16965b76f33bb62b /tvix/eval
parent4b27cdbc5727a4b196449d25f97f505cb517207e (diff)
refactor(tvix/eval/tests): migrate to tempfile r/6739
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
Diffstat (limited to 'tvix/eval')
-rw-r--r--tvix/eval/Cargo.toml2
-rw-r--r--tvix/eval/tests/nix_oracle.rs3
2 files changed, 2 insertions, 3 deletions
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![],