From 4ab180b1ebf411d7d7ebd98ae17c25945b17e2c2 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 30 Mar 2023 13:38:35 +0200 Subject: refactor(tvix/nix-compat): use Sha256::new_with_prefix Change-Id: I328983008c0680e0448ccff604dbdae312f7988b Reviewed-on: https://cl.tvl.fyi/c/depot/+/8366 Autosubmit: flokli Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/nix-compat/src/derivation/utils.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tvix/nix-compat/src/derivation/utils.rs b/tvix/nix-compat/src/derivation/utils.rs index ee7ea26c6a..5c41fa6e55 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 { 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); -- cgit 1.4.1