about summary refs log tree commit diff
path: root/tvix/nix-compat/src/derivation/utils.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-03-30T11·38+0200
committerclbot <clbot@tvl.fyi>2023-03-30T14·03+0000
commit4ab180b1ebf411d7d7ebd98ae17c25945b17e2c2 (patch)
tree008163bd8132776177a2daa050f0f218e11c7e05 /tvix/nix-compat/src/derivation/utils.rs
parent6454769eefc6be2bc3f7351f915ca0be37e07541 (diff)
refactor(tvix/nix-compat): use Sha256::new_with_prefix r/6059
Change-Id: I328983008c0680e0448ccff604dbdae312f7988b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8366
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/nix-compat/src/derivation/utils.rs')
-rw-r--r--tvix/nix-compat/src/derivation/utils.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/tvix/nix-compat/src/derivation/utils.rs b/tvix/nix-compat/src/derivation/utils.rs
index ee7ea26c6ae3..5c41fa6e55d2 100644
--- a/tvix/nix-compat/src/derivation/utils.rs
+++ b/tvix/nix-compat/src/derivation/utils.rs
@@ -32,8 +32,7 @@ pub(super) fn build_store_path(
     name: &str,
 ) -> Result<StorePath, DerivationError> {
     let digest = {
-        let mut hasher = Sha256::new();
-        hasher.update(fingerprint);
+        let hasher = Sha256::new_with_prefix(fingerprint);
         hasher.finalize()
     };
     let compressed = compress_hash(&digest, 20);