about summary refs log tree commit diff
path: root/tvix/castore/src
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-04-20T12·00+0300
committerclbot <clbot@tvl.fyi>2024-04-20T14·14+0000
commitc4cb099823dbd20f673b870b47e4fb27af6c139c (patch)
tree37d98aa909a6811d60ee596b1f3fe710e28fed09 /tvix/castore/src
parent259d7a3cfa214e7eab7b0862024d595489e92592 (diff)
refactor(tvix/castore/import): rename ingest_entries arg r/7980
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 <cbrewster@hey.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/castore/src')
-rw-r--r--tvix/castore/src/import.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/tvix/castore/src/import.rs b/tvix/castore/src/import.rs
index 049c177efcaa..a07cf71f6c41 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<Node, Error>
+pub async fn ingest_entries<'a, DS, S>(directory_service: DS, mut entries: S) -> Result<Node, Error>
 where
     DS: AsRef<dyn DirectoryService>,
     S: Stream<Item = Result<IngestionEntry<'a>, Error>> + Send + std::marker::Unpin,
@@ -240,7 +237,7 @@ where
     let mut maybe_directory_putter: Option<Box<dyn DirectoryPutter>> = 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