From c4cb099823dbd20f673b870b47e4fb27af6c139c Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 20 Apr 2024 15:00:43 +0300 Subject: [PATCH] refactor(tvix/castore/import): rename ingest_entries arg This is not a stream of direntries anymore, but a stream of ingestion entries. Change-Id: I387f4497b6567066b24c58ca0262e710348180e9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11485 Reviewed-by: Connor Brewster Autosubmit: flokli Tested-by: BuildkiteCI --- tvix/castore/src/import.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tvix/castore/src/import.rs b/tvix/castore/src/import.rs index 049c177ef..a07cf71f6 100644 --- a/tvix/castore/src/import.rs +++ b/tvix/castore/src/import.rs @@ -214,7 +214,7 @@ where ingest_entries(directory_service, entry_stream).await } -/// Ingests elements from the given stream of [DirEntry] into a the passed [DirectoryService]. +/// Ingests elements from the given stream of [IngestionEntry] into a the passed [DirectoryService]. /// /// The stream must have the following invariants: /// - All children entries must come before their parents. @@ -227,10 +227,7 @@ where /// /// On success, returns the root node. #[instrument(skip_all, ret(level = Level::TRACE), err)] -pub async fn ingest_entries<'a, DS, S>( - directory_service: DS, - #[allow(unused_mut)] mut direntry_stream: S, -) -> Result +pub async fn ingest_entries<'a, DS, S>(directory_service: DS, mut entries: S) -> Result where DS: AsRef, S: Stream, Error>> + Send + std::marker::Unpin, @@ -240,7 +237,7 @@ where let mut maybe_directory_putter: Option> = None; let root_node = loop { - let mut entry = direntry_stream + let mut entry = entries .next() .await // The last entry of the stream must have 1 path component, after which