about summary refs log tree commit diff
path: root/tvix/store/src/proto/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store/src/proto/mod.rs')
-rw-r--r--tvix/store/src/proto/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/store/src/proto/mod.rs b/tvix/store/src/proto/mod.rs
index fceb6b5902..f5945d650a 100644
--- a/tvix/store/src/proto/mod.rs
+++ b/tvix/store/src/proto/mod.rs
@@ -236,10 +236,10 @@ impl Directory {
 
     /// Calculates the digest of a Directory, which is the blake3 hash of a
     /// Directory protobuf message, serialized in protobuf canonical form.
-    pub fn digest(&self) -> Vec<u8> {
+    pub fn digest(&self) -> [u8; 32] {
         let mut hasher = blake3::Hasher::new();
 
-        hasher.update(&self.encode_to_vec()).finalize().as_bytes()[..].to_vec()
+        *hasher.update(&self.encode_to_vec()).finalize().as_bytes()
     }
 
     /// validate checks the directory for invalid data, such as: