diff --git a/tvix/castore/src/import.rs b/tvix/castore/src/import.rs index 1b8c4ec5a..4545f35fc 100644 --- a/tvix/castore/src/import.rs +++ b/tvix/castore/src/import.rs @@ -149,7 +149,7 @@ where /// It's up to the caller to possibly register it somewhere (and potentially /// rename it based on some naming scheme) #[instrument(skip(blob_service, directory_service), fields(path=?p), err)] -pub async fn ingest_path( +pub async fn ingest_path<'a, BS, DS, P>( blob_service: BS, directory_service: DS, p: P, @@ -157,7 +157,7 @@ pub async fn ingest_path( where P: AsRef + Debug, BS: Deref + Clone, - DS: Deref, + DS: Deref, { let mut directories: HashMap = HashMap::default(); diff --git a/tvix/castore/src/tests/import.rs b/tvix/castore/src/tests/import.rs index 75c632799..333254706 100644 --- a/tvix/castore/src/tests/import.rs +++ b/tvix/castore/src/tests/import.rs @@ -4,6 +4,7 @@ use crate::fixtures::*; use crate::import::ingest_path; use crate::proto; use crate::utils::{gen_blob_service, gen_directory_service}; +use std::ops::Deref; use std::sync::Arc; use tempfile::TempDir; @@ -27,7 +28,7 @@ async fn symlink() { let root_node = ingest_path( blob_service, - directory_service, + &directory_service.deref(), tmpdir.path().join("doesntmatter"), ) .await @@ -53,7 +54,7 @@ async fn single_file() { let root_node = ingest_path( blob_service.clone(), - directory_service, + &directory_service.deref(), tmpdir.path().join("root"), ) .await @@ -92,7 +93,7 @@ async fn complicated() { let root_node = ingest_path( blob_service.clone(), - directory_service.clone(), + &directory_service.deref(), tmpdir.path(), ) .await diff --git a/tvix/store/src/utils.rs b/tvix/store/src/utils.rs index 05d4f79b1..6edbf94ee 100644 --- a/tvix/store/src/utils.rs +++ b/tvix/store/src/utils.rs @@ -54,7 +54,7 @@ pub async fn import_path( where P: AsRef + std::fmt::Debug, BS: Deref + Clone, - DS: Deref + Clone, + DS: Deref, PS: Deref, { // calculate the name @@ -71,9 +71,10 @@ where })?; // Ingest the path into blob and directory service. - let root_node = tvix_castore::import::ingest_path(blob_service, directory_service, &path) - .await - .expect("failed to ingest path"); + let root_node = + tvix_castore::import::ingest_path(blob_service, &directory_service.deref(), &path) + .await + .expect("failed to ingest path"); debug!(root_node =?root_node, "import successful");