about summary refs log tree commit diff
path: root/tvix/cli
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/cli')
-rw-r--r--tvix/cli/src/derivation.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/tvix/cli/src/derivation.rs b/tvix/cli/src/derivation.rs
index 6cde7a366c2b..a6f1beccc959 100644
--- a/tvix/cli/src/derivation.rs
+++ b/tvix/cli/src/derivation.rs
@@ -128,12 +128,8 @@ fn populate_output_configuration(
 
                 // construct the NixHashWithMode.
                 out.hash_with_mode = match hash_mode.as_deref() {
-                    None | Some("flat") => Some(nixhash::NixHashWithMode::Flat(
-                        nixhash::NixHash::new(output_hash.algo, output_hash.digest),
-                    )),
-                    Some("recursive") => Some(nixhash::NixHashWithMode::Recursive(
-                        nixhash::NixHash::new(output_hash.algo, output_hash.digest),
-                    )),
+                    None | Some("flat") => Some(nixhash::NixHashWithMode::Flat(output_hash)),
+                    Some("recursive") => Some(nixhash::NixHashWithMode::Recursive(output_hash)),
                     Some(other) => {
                         return Err(Error::InvalidOutputHashMode(other.to_string()).into())
                     }