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/proto/grpc_pathinfoservice_wrapper.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'tvix/store/src/proto/grpc_pathinfoservice_wrapper.rs') diff --git a/tvix/store/src/proto/grpc_pathinfoservice_wrapper.rs b/tvix/store/src/proto/grpc_pathinfoservice_wrapper.rs index 645f4aa60556..9f26da213bd5 100644 --- a/tvix/store/src/proto/grpc_pathinfoservice_wrapper.rs +++ b/tvix/store/src/proto/grpc_pathinfoservice_wrapper.rs @@ -1,15 +1,16 @@ use crate::nar::RenderError; use crate::pathinfoservice::PathInfoService; use crate::proto; +use std::sync::Arc; use tonic::{async_trait, Request, Response, Result, Status}; use tracing::{instrument, warn}; -pub struct GRPCPathInfoServiceWrapper { - path_info_service: PS, +pub struct GRPCPathInfoServiceWrapper { + path_info_service: Arc, } -impl From for GRPCPathInfoServiceWrapper { - fn from(value: PS) -> Self { +impl From> for GRPCPathInfoServiceWrapper { + fn from(value: Arc) -> Self { Self { path_info_service: value, } @@ -17,9 +18,7 @@ impl From for GRPCPathInfoServiceWrapper { } #[async_trait] -impl proto::path_info_service_server::PathInfoService - for GRPCPathInfoServiceWrapper -{ +impl proto::path_info_service_server::PathInfoService for GRPCPathInfoServiceWrapper { #[instrument(skip(self))] async fn get( &self, -- cgit 1.4.1