about summary refs log tree commit diff
path: root/tvix/store/src/tests/utils.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-01-12T10·18+0200
committerclbot <clbot@tvl.fyi>2024-01-12T20·37+0000
commitb59df53774acc654ea4b23f02ccf5529587bceff (patch)
treefa35191cd12dbca2478884616de2527eb89066e2 /tvix/store/src/tests/utils.rs
parent7d51193f7db8d6126ee2970eadf009a5d87b694f (diff)
refactor(tvix/store/pathinfoservice): make more generic r/7371
We don't need Arcs in most of the cases, we're fine with some container.

Change-Id: Ic4f8acb5b9d93e2b0923bb607463fb91e9d0e4fe
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10606
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Diffstat (limited to 'tvix/store/src/tests/utils.rs')
-rw-r--r--tvix/store/src/tests/utils.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/tvix/store/src/tests/utils.rs b/tvix/store/src/tests/utils.rs
index 961be6e7ac07..040b7ee7f51f 100644
--- a/tvix/store/src/tests/utils.rs
+++ b/tvix/store/src/tests/utils.rs
@@ -4,9 +4,13 @@ use tvix_castore::{blobservice::BlobService, directoryservice::DirectoryService}
 
 pub use tvix_castore::utils::*;
 
-pub fn gen_pathinfo_service(
-    blob_service: Arc<dyn BlobService>,
-    directory_service: Arc<dyn DirectoryService>,
-) -> Arc<dyn PathInfoService> {
+pub fn gen_pathinfo_service<BS, DS>(
+    blob_service: BS,
+    directory_service: DS,
+) -> Arc<dyn PathInfoService>
+where
+    BS: AsRef<dyn BlobService> + Send + Sync + 'static,
+    DS: AsRef<dyn DirectoryService> + Send + Sync + 'static,
+{
     Arc::new(MemoryPathInfoService::new(blob_service, directory_service))
 }