From 71174f6626cbf100a8428ddc334681e4edfb45e6 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 20 Dec 2022 17:22:56 +0300 Subject: fix(tvix/eval): fix current clippy warnings It's been a while since the last time, so quite a lot of stuff has accumulated here. Change-Id: I0762827c197b30a917ff470fd8ae8f220f6ba247 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7597 Reviewed-by: grfn Autosubmit: tazjin Tested-by: BuildkiteCI --- tvix/eval/src/tests/mod.rs | 14 ++++++-------- .../tests/nix_tests/notyetpassing/eval-okay-readDir.nix | 1 - .../nix_tests/notyetpassing/eval-okay-readDir.nix.disabled | 1 + 3 files changed, 7 insertions(+), 9 deletions(-) delete mode 100644 tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-readDir.nix create mode 100644 tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-readDir.nix.disabled (limited to 'tvix/eval/src/tests') diff --git a/tvix/eval/src/tests/mod.rs b/tvix/eval/src/tests/mod.rs index 1c872f67d2b0..bb46cf2b79b0 100644 --- a/tvix/eval/src/tests/mod.rs +++ b/tvix/eval/src/tests/mod.rs @@ -49,15 +49,13 @@ fn eval_test(code_path: &str, expect_success: bool) { "{code_path}: test passed unexpectedly! consider moving it out of notyetpassing" ); } + } else if expect_success { + panic!("{code_path}: should be able to read test expectation"); } else { - if expect_success { - panic!("{code_path}: should be able to read test expectation"); - } else { - panic!( - "{code_path}: test should have failed, but succeeded with output {}", - result_str - ); - } + panic!( + "{code_path}: test should have failed, but succeeded with output {}", + result_str + ); } } diff --git a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-readDir.nix b/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-readDir.nix deleted file mode 100644 index a7ec9292aae2..000000000000 --- a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-readDir.nix +++ /dev/null @@ -1 +0,0 @@ -builtins.readDir ./readDir diff --git a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-readDir.nix.disabled b/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-readDir.nix.disabled new file mode 100644 index 000000000000..a7ec9292aae2 --- /dev/null +++ b/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-readDir.nix.disabled @@ -0,0 +1 @@ +builtins.readDir ./readDir -- cgit 1.4.1