about summary refs log tree commit diff
path: root/tvix/castore/src/import/mod.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-05-04T19·23+0300
committerflokli <flokli@flokli.de>2024-05-04T21·27+0000
commitba00f0c6955fcd505cfa7ef06dc35b53ac14868a (patch)
treec695c21ee57bc51926fc24daf1ddba5dc8ca0796 /tvix/castore/src/import/mod.rs
parentf2f12d15568b068b7b38473c03b74275a7f43cee (diff)
refactor(tvix/*store): use DS: DirectoryService r/8073
We implement DirectoryService for Arc<DirectoryService> and
Box<DirectoryService>, this is sufficient.

Change-Id: I0a5a81cbc4782764406b5bca57f908ace6090737
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11586
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Diffstat (limited to 'tvix/castore/src/import/mod.rs')
-rw-r--r--tvix/castore/src/import/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/castore/src/import/mod.rs b/tvix/castore/src/import/mod.rs
index 53ebc2b339c7..7b42644a2779 100644
--- a/tvix/castore/src/import/mod.rs
+++ b/tvix/castore/src/import/mod.rs
@@ -49,7 +49,7 @@ pub async fn ingest_entries<DS, S, E>(
     mut entries: S,
 ) -> Result<Node, IngestionError<E>>
 where
-    DS: AsRef<dyn DirectoryService>,
+    DS: DirectoryService,
     S: Stream<Item = Result<IngestionEntry, E>> + Send + std::marker::Unpin,
     E: std::error::Error,
 {
@@ -90,7 +90,7 @@ where
                 // If we don't have one yet (as that's the first one to upload),
                 // initialize the putter.
                 maybe_directory_putter
-                    .get_or_insert_with(|| directory_service.as_ref().put_multiple_start())
+                    .get_or_insert_with(|| directory_service.put_multiple_start())
                     .put(directory)
                     .await
                     .map_err(|e| {