about summary refs log tree commit diff
path: root/tvix/store/src/store_io.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-06-12T13·04+0300
committerflokli <flokli@flokli.de>2023-06-12T13·27+0000
commitb5e37869e6ddddf0575bdc98e0f4cc05753f0fc0 (patch)
tree92aeb382accb472ab935ec1f097c0dd6a547e27c /tvix/store/src/store_io.rs
parent64a4f6185c5dcd96ee57978963324ea50f4dd6f7 (diff)
refactor(tvix/store/pathinfosvc): use Arc<dyn …> r/6279
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 <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/store/src/store_io.rs')
-rw-r--r--tvix/store/src/store_io.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/tvix/store/src/store_io.rs b/tvix/store/src/store_io.rs
index c35da49da998..fcbc5842a3e2 100644
--- a/tvix/store/src/store_io.rs
+++ b/tvix/store/src/store_io.rs
@@ -29,18 +29,18 @@ use crate::{
 /// This is to both cover cases of syntactically valid store paths, that exist
 /// on the filesystem (still managed by Nix), as well as being able to read
 /// files outside store paths.
-pub struct TvixStoreIO<PS: PathInfoService> {
+pub struct TvixStoreIO {
     blob_service: Arc<dyn BlobService>,
     directory_service: Arc<dyn DirectoryService>,
-    path_info_service: PS,
+    path_info_service: Arc<dyn PathInfoService>,
     std_io: StdIO,
 }
 
-impl<PS: PathInfoService> TvixStoreIO<PS> {
+impl TvixStoreIO {
     pub fn new(
         blob_service: Arc<dyn BlobService>,
         directory_service: Arc<dyn DirectoryService>,
-        path_info_service: PS,
+        path_info_service: Arc<dyn PathInfoService>,
     ) -> Self {
         Self {
             blob_service,
@@ -179,7 +179,7 @@ fn calculate_nar_based_store_path(nar_sha256_digest: &[u8; 32], name: &str) -> S
     build_regular_ca_path(name, &nar_hash_with_mode, Vec::<String>::new(), false).unwrap()
 }
 
-impl<PS: PathInfoService> EvalIO for TvixStoreIO<PS> {
+impl EvalIO for TvixStoreIO {
     #[instrument(skip(self), ret, err)]
     fn path_exists(&self, path: &Path) -> Result<bool, io::Error> {
         if let Ok((store_path, sub_path)) =