From 9c223450199b466c535f2b715ad68f1f295fa7dc Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Fri, 18 Oct 2024 14:41:14 +0200 Subject: refactor(tvix/[ca]store): use auto_impl This implements BS, DS, PS for Box'ed or Arc'ed variants of it with less code, and less potential to accidentially forget to proxy default trait methods for blanked impls, as fixed in cl/12658. Change-Id: If2cdbb563a73792038ebe7bff45d6f880214855b Reviewed-on: https://cl.tvl.fyi/c/depot/+/12661 Tested-by: BuildkiteCI Autosubmit: flokli Reviewed-by: edef --- tvix/build/src/buildservice/from_addr.rs | 4 ++-- tvix/build/src/buildservice/oci.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tvix/build') diff --git a/tvix/build/src/buildservice/from_addr.rs b/tvix/build/src/buildservice/from_addr.rs index 0f4c190c2aca..ba185bb25514 100644 --- a/tvix/build/src/buildservice/from_addr.rs +++ b/tvix/build/src/buildservice/from_addr.rs @@ -20,8 +20,8 @@ pub async fn from_addr( directory_service: DS, ) -> std::io::Result> where - BS: AsRef + Send + Sync + Clone + 'static, - DS: AsRef + Send + Sync + Clone + 'static, + BS: BlobService + Send + Sync + Clone + 'static, + DS: DirectoryService + Send + Sync + Clone + 'static, { let url = Url::parse(uri) .map_err(|e| std::io::Error::other(format!("unable to parse url: {}", e)))?; diff --git a/tvix/build/src/buildservice/oci.rs b/tvix/build/src/buildservice/oci.rs index 875e1de447ef..7b88518e924f 100644 --- a/tvix/build/src/buildservice/oci.rs +++ b/tvix/build/src/buildservice/oci.rs @@ -91,8 +91,8 @@ impl OCIBuildService { #[async_trait] impl BuildService for OCIBuildService where - BS: AsRef + Send + Sync + Clone + 'static, - DS: AsRef + Send + Sync + Clone + 'static, + BS: BlobService + Clone + 'static, + DS: DirectoryService + Clone + 'static, { #[instrument(skip_all, err)] async fn do_build(&self, request: BuildRequest) -> std::io::Result { -- cgit 1.4.1