about summary refs log tree commit diff
path: root/tvix/castore/src/directoryservice/sled.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/castore/src/directoryservice/sled.rs')
-rw-r--r--tvix/castore/src/directoryservice/sled.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/castore/src/directoryservice/sled.rs b/tvix/castore/src/directoryservice/sled.rs
index 0dc5496803cb..041908f9f956 100644
--- a/tvix/castore/src/directoryservice/sled.rs
+++ b/tvix/castore/src/directoryservice/sled.rs
@@ -64,7 +64,7 @@ impl DirectoryService for SledDirectoryService {
 
     #[instrument(skip(self, digest), fields(directory.digest = %digest))]
     async fn get(&self, digest: &B3Digest) -> Result<Option<proto::Directory>, Error> {
-        match self.db.get(digest.to_vec()) {
+        match self.db.get(digest.as_slice()) {
             // The directory was not found, return
             Ok(None) => Ok(None),
 
@@ -114,7 +114,7 @@ impl DirectoryService for SledDirectoryService {
             )));
         }
         // store it
-        let result = self.db.insert(digest.to_vec(), directory.encode_to_vec());
+        let result = self.db.insert(digest.as_slice(), directory.encode_to_vec());
         if let Err(e) = result {
             return Err(Error::StorageError(e.to_string()));
         }