about summary refs log tree commit diff
path: root/tvix/store/src/utils.rs
diff options
context:
space:
mode:
authorYureka <tvl@yuka.dev>2024-07-18T17·09+0200
committeryuka <tvl@yuka.dev>2024-07-18T19·19+0000
commit168e4fda5909e535f33051051ef426e221ef20d4 (patch)
treee23b8ad4ced3f4232bdb0ad186f3b63f693c57e5 /tvix/store/src/utils.rs
parent79317be214ce2f1e3347438319d3482bb773a649 (diff)
refactor(tvix): use composition & registry for from_addr r/8368
Change-Id: I3c94ecb5958294b5973c6fcdf5ee9c0d37fa54ad
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11976
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Autosubmit: yuka <yuka@yuka.dev>
Diffstat (limited to 'tvix/store/src/utils.rs')
-rw-r--r--tvix/store/src/utils.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/tvix/store/src/utils.rs b/tvix/store/src/utils.rs
index bd3c65a77998..d82f2214f050 100644
--- a/tvix/store/src/utils.rs
+++ b/tvix/store/src/utils.rs
@@ -19,19 +19,19 @@ pub async fn construct_services(
     blob_service_addr: impl AsRef<str>,
     directory_service_addr: impl AsRef<str>,
     path_info_service_addr: impl AsRef<str>,
-) -> std::io::Result<(
-    Arc<dyn BlobService>,
-    Arc<dyn DirectoryService>,
-    Box<dyn PathInfoService>,
-    Box<dyn NarCalculationService>,
-)> {
-    let blob_service: Arc<dyn BlobService> = blobservice::from_addr(blob_service_addr.as_ref())
-        .await?
-        .into();
+) -> Result<
+    (
+        Arc<dyn BlobService>,
+        Arc<dyn DirectoryService>,
+        Box<dyn PathInfoService>,
+        Box<dyn NarCalculationService>,
+    ),
+    Box<dyn std::error::Error + Send + Sync>,
+> {
+    let blob_service: Arc<dyn BlobService> =
+        blobservice::from_addr(blob_service_addr.as_ref()).await?;
     let directory_service: Arc<dyn DirectoryService> =
-        directoryservice::from_addr(directory_service_addr.as_ref())
-            .await?
-            .into();
+        directoryservice::from_addr(directory_service_addr.as_ref()).await?;
 
     let path_info_service = pathinfoservice::from_addr(
         path_info_service_addr.as_ref(),