refactor(tvix/nix-compat): use Sha256::new_with_prefix

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>
This commit is contained in:
Florian Klink 2023-03-30 13:38:35 +02:00 committed by clbot
parent 6454769eef
commit 4ab180b1eb

View file

@ -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);