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:
parent
6454769eef
commit
4ab180b1eb
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue