From 37e7742ba91991551cc81a0c9280247da8bf7656 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 12 Jun 2023 23:45:08 +0300 Subject: chore(tvix/store/blobsvc): remove GRPCBlobService::new There's very little reason to instantiate a GRPCBlobService in a context where we are not already in a tokio context. Change-Id: Ic6e18809a9f2a76f1c098ed330118d8dcfba5137 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8753 Reviewed-by: tazjin Autosubmit: flokli Tested-by: BuildkiteCI --- tvix/store/src/blobservice/grpc.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'tvix/store/src/blobservice/grpc.rs') diff --git a/tvix/store/src/blobservice/grpc.rs b/tvix/store/src/blobservice/grpc.rs index 6f04c6a3d4b6..fbf2dfe72e90 100644 --- a/tvix/store/src/blobservice/grpc.rs +++ b/tvix/store/src/blobservice/grpc.rs @@ -23,17 +23,6 @@ pub struct GRPCBlobService { } impl GRPCBlobService { - /// construct a [GRPCBlobService] from a [proto::blob_service_client::BlobServiceClient], - /// and a [tokio::runtime::Handle]. - pub fn new( - grpc_client: proto::blob_service_client::BlobServiceClient, - tokio_handle: tokio::runtime::Handle, - ) -> Self { - Self { - tokio_handle, - grpc_client, - } - } /// construct a [GRPCBlobService] from a [proto::blob_service_client::BlobServiceClient]. /// panics if called outside the context of a tokio runtime. pub fn from_client( @@ -156,7 +145,7 @@ impl BlobService for GRPCBlobService { let writer = SyncIoBridge::new(async_writer); Box::new(GRPCBlobWriter { - tokio_handle: self.tokio_handle.clone(), // TODO: is the clone() ok here? + tokio_handle: self.tokio_handle.clone(), task_and_writer: Some((task, writer)), digest: None, }) -- cgit 1.4.1