diff options
Diffstat (limited to 'tvix/castore/src')
-rw-r--r-- | tvix/castore/src/blobservice/grpc.rs | 7 | ||||
-rw-r--r-- | tvix/castore/src/directoryservice/grpc.rs | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/tvix/castore/src/blobservice/grpc.rs b/tvix/castore/src/blobservice/grpc.rs index 115efa5f09c6..52adf2c6dde5 100644 --- a/tvix/castore/src/blobservice/grpc.rs +++ b/tvix/castore/src/blobservice/grpc.rs @@ -112,12 +112,11 @@ impl BlobService for GRPCBlobService { &self, digest: &B3Digest, ) -> Result<Option<Box<dyn BlobReader>>, crate::Error> { - // Get a new handle to the gRPC client, and copy the digest. - let mut grpc_client = self.grpc_client.clone(); - // Get a stream of [proto::BlobChunk], or return an error if the blob // doesn't exist. - let resp = grpc_client + let resp = self + .grpc_client + .clone() .read(proto::ReadBlobRequest { digest: digest.clone().into(), }) diff --git a/tvix/castore/src/directoryservice/grpc.rs b/tvix/castore/src/directoryservice/grpc.rs index 7ef9f84b0a16..4ee2d28e97c0 100644 --- a/tvix/castore/src/directoryservice/grpc.rs +++ b/tvix/castore/src/directoryservice/grpc.rs @@ -139,9 +139,11 @@ impl DirectoryService for GRPCDirectoryService { } async fn put(&self, directory: crate::proto::Directory) -> Result<B3Digest, crate::Error> { - let mut grpc_client = self.grpc_client.clone(); - - let resp = grpc_client.put(tokio_stream::iter(vec![directory])).await; + let resp = self + .grpc_client + .clone() + .put(tokio_stream::once(directory)) + .await; match resp { Ok(put_directory_resp) => Ok(put_directory_resp |