diff options
author | Florian Klink <flokli@flokli.de> | 2024-02-29T08·31+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-03-03T11·56+0000 |
commit | 260c2938d4ef038993fbd0c84a7ec220ef3f78f2 (patch) | |
tree | 4a032a05bd7e5f6edfafbd7001fe736e01f3d498 /tvix/nix-compat/src/nixhash | |
parent | 7bebf492ec7742b8a24c695d77fa64fdf654ab19 (diff) |
refactor(tvix/nix-compat): rename NixHash::{digest,hash} r/7632
This doesn't return the digest, but the internal NixHash. To get the digest, you use `ca_hash.hash().digest_as_bytes()` (as done in tvix/nix-compat/src/derivation/write.rs). Change-Id: Ib07918dec63ae42ddf8c8d3f1d10510f9c4df255 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11070 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/nix-compat/src/nixhash')
-rw-r--r-- | tvix/nix-compat/src/nixhash/ca_hash.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/nix-compat/src/nixhash/ca_hash.rs b/tvix/nix-compat/src/nixhash/ca_hash.rs index 0d6c68d7fa7f..d69d19ce68f3 100644 --- a/tvix/nix-compat/src/nixhash/ca_hash.rs +++ b/tvix/nix-compat/src/nixhash/ca_hash.rs @@ -23,7 +23,7 @@ pub enum CAHash { } impl CAHash { - pub fn digest(&self) -> Cow<NixHash> { + pub fn hash(&self) -> Cow<NixHash> { match *self { CAHash::Flat(ref digest) => Cow::Borrowed(digest), CAHash::Nar(ref digest) => Cow::Borrowed(digest), |