From 4ae0f428bd207fdf3730d0f6ff73c7410ae9cd7b Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 14 Oct 2023 17:48:16 +0100 Subject: refactor(tvix/nix-compat): make NixHash an enum with fixed-len bytes Less Vec passed around. Change-Id: Ie153a6bfaa084d7490ffa38634efdf5f3c31a768 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9722 Reviewed-by: Connor Brewster Autosubmit: flokli Tested-by: BuildkiteCI --- tvix/nix-compat/src/derivation/tests/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tvix/nix-compat/src/derivation/tests') diff --git a/tvix/nix-compat/src/derivation/tests/mod.rs b/tvix/nix-compat/src/derivation/tests/mod.rs index de4ebb6cb2..833a442c8f 100644 --- a/tvix/nix-compat/src/derivation/tests/mod.rs +++ b/tvix/nix-compat/src/derivation/tests/mod.rs @@ -238,17 +238,16 @@ fn output_path_construction() { Output { path: "".to_string(), // will be calculated hash_with_mode: Some(crate::nixhash::NixHashWithMode::Recursive( - ( + crate::nixhash::from_algo_and_digest( crate::nixhash::HashAlgo::Sha256, - data_encoding::HEXLOWER + &data_encoding::HEXLOWER .decode( "08813cbee9903c62be4c5027726a418a300da4500b2d369d3af9286f4815ceba" .as_bytes(), ) .unwrap(), ) - .try_into() - .unwrap(), + .unwrap(), )), }, ); -- cgit 1.4.1