From e9db0449e700154baee1470f914c3f09089442d0 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 20 Apr 2024 15:01:49 +0300 Subject: refactor(tvix/castore/import): make module, split off fs and error Move error types and filesystem-specific functions to a separate file, and keep the fs:: namespace in public exports. Change-Id: I5e9e83ad78d9aea38553fafc293d3e4f8c31a8c1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11486 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster Autosubmit: flokli --- tvix/store/src/import.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tvix/store/src/import.rs') diff --git a/tvix/store/src/import.rs b/tvix/store/src/import.rs index 5cff29a9e5..7b6aeb824e 100644 --- a/tvix/store/src/import.rs +++ b/tvix/store/src/import.rs @@ -1,7 +1,8 @@ use std::path::Path; use tracing::{debug, instrument}; use tvix_castore::{ - blobservice::BlobService, directoryservice::DirectoryService, proto::node::Node, B3Digest, + blobservice::BlobService, directoryservice::DirectoryService, import::fs::ingest_path, + proto::node::Node, B3Digest, }; use nix_compat::{ @@ -116,8 +117,7 @@ where DS: AsRef, PS: AsRef, { - let root_node = - tvix_castore::import::ingest_path(blob_service, directory_service, path.as_ref()).await?; + let root_node = ingest_path(blob_service, directory_service, path.as_ref()).await?; // Ask the PathInfoService for the NAR size and sha256 let (nar_size, nar_sha256) = path_info_service.as_ref().calculate_nar(&root_node).await?; -- cgit 1.4.1