diff options
author | Florian Klink <flokli@flokli.de> | 2023-06-12T20·45+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-06-12T21·33+0000 |
commit | 37e7742ba91991551cc81a0c9280247da8bf7656 (patch) | |
tree | bffc60282452fd7362bb96cb5496fd91672f9800 | |
parent | b5e37869e6ddddf0575bdc98e0f4cc05753f0fc0 (diff) |
chore(tvix/store/blobsvc): remove GRPCBlobService::new r/6280
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 <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
-rw-r--r-- | tvix/store/src/blobservice/grpc.rs | 13 |
1 files changed, 1 insertions, 12 deletions
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<Channel>], - /// and a [tokio::runtime::Handle]. - pub fn new( - grpc_client: proto::blob_service_client::BlobServiceClient<Channel>, - tokio_handle: tokio::runtime::Handle, - ) -> Self { - Self { - tokio_handle, - grpc_client, - } - } /// construct a [GRPCBlobService] from a [proto::blob_service_client::BlobServiceClient<Channel>]. /// 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, }) |