From b5e37869e6ddddf0575bdc98e0f4cc05753f0fc0 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 12 Jun 2023 16:04:56 +0300 Subject: refactor(tvix/store/pathinfosvc): use Arc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This removes the use of generics, like previously done with Blob and Directory services. Change-Id: I7cc8bd1439b026c88e80c11e38aafc63c74e5e84 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8751 Tested-by: BuildkiteCI Autosubmit: flokli Reviewed-by: tazjin --- tvix/store/src/bin/tvix-store.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tvix/store/src/bin/tvix-store.rs') diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs index ae72559d3943..b95f408a55b6 100644 --- a/tvix/store/src/bin/tvix-store.rs +++ b/tvix/store/src/bin/tvix-store.rs @@ -13,6 +13,7 @@ use tvix_store::directoryservice::DirectoryService; use tvix_store::directoryservice::GRPCDirectoryService; use tvix_store::directoryservice::SledDirectoryService; use tvix_store::pathinfoservice::GRPCPathInfoService; +use tvix_store::pathinfoservice::PathInfoService; use tvix_store::pathinfoservice::SledPathInfoService; use tvix_store::proto::blob_service_client::BlobServiceClient; use tvix_store::proto::blob_service_server::BlobServiceServer; @@ -104,11 +105,11 @@ async fn main() -> Result<(), Box> { Arc::new(SledBlobService::new("blobs.sled".into())?); let directory_service: Arc = Arc::new(SledDirectoryService::new("directories.sled".into())?); - let path_info_service = SledPathInfoService::new( + let path_info_service: Arc = Arc::new(SledPathInfoService::new( "pathinfo.sled".into(), blob_service.clone(), directory_service.clone(), - )?; + )?); let listen_address = listen_address .unwrap_or_else(|| "[::]:8000".to_string()) @@ -156,7 +157,7 @@ async fn main() -> Result<(), Box> { let io = Arc::new(TvixStoreIO::new( Arc::new(blob_service), Arc::new(directory_service), - path_info_service, + Arc::new(path_info_service), )); let tasks = paths @@ -193,7 +194,7 @@ async fn main() -> Result<(), Box> { let f = FUSE::new( Arc::new(blob_service), Arc::new(directory_service), - path_info_service, + Arc::new(path_info_service), ); fuser::mount2(f, &dest, &[]) }) -- cgit 1.4.1