From 64a4f6185c5dcd96ee57978963324ea50f4dd6f7 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 12 Jun 2023 15:13:00 +0300 Subject: refactor(tvix/store/blobsvc): drop Result<_,_> around open_write We never returned Err here anyways, and we can still return an error during the first (or subsequent) write(s). Change-Id: I4b4cd3d35f6ea008e9ffe2f7b71bfc9187309e2f Reviewed-on: https://cl.tvl.fyi/c/depot/+/8750 Autosubmit: flokli Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/store/src/blobservice/grpc.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 46ec64bce785..6f04c6a3d4b6 100644 --- a/tvix/store/src/blobservice/grpc.rs +++ b/tvix/store/src/blobservice/grpc.rs @@ -121,9 +121,9 @@ impl BlobService for GRPCBlobService { } } - /// Returns a [Self::BlobWriter], that'll internally wrap each write in a - // [proto::BlobChunk] and which is passed to the - fn open_write(&self) -> Result, crate::Error> { + /// Returns a BlobWriter, that'll internally wrap each write in a + // [proto::BlobChunk], which is send to the gRPC server. + fn open_write(&self) -> Box { let mut grpc_client = self.grpc_client.clone(); // set up an mpsc channel passing around Bytes. @@ -155,11 +155,11 @@ impl BlobService for GRPCBlobService { // … which is then turned into a [io::Write]. let writer = SyncIoBridge::new(async_writer); - Ok(Box::new(GRPCBlobWriter { + Box::new(GRPCBlobWriter { tokio_handle: self.tokio_handle.clone(), // TODO: is the clone() ok here? task_and_writer: Some((task, writer)), digest: None, - })) + }) } } -- cgit 1.4.1