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,
|
name: &str,
|
||||||
) -> Result<StorePath, DerivationError> {
|
) -> Result<StorePath, DerivationError> {
|
||||||
let digest = {
|
let digest = {
|
||||||
let mut hasher = Sha256::new();
|
let hasher = Sha256::new_with_prefix(fingerprint);
|
||||||
hasher.update(fingerprint);
|
|
||||||
hasher.finalize()
|
hasher.finalize()
|
||||||
};
|
};
|
||||||
let compressed = compress_hash(&digest, 20);
|
let compressed = compress_hash(&digest, 20);
|
||||||
|
|
Loading…
Reference in a new issue