about summary refs log tree commit diff
path: root/tvix/glue/src/tvix_store_io.rs
diff options
context:
space:
mode:
authorConnor Brewster <cbrewster@hey.com>2024-04-20T18·39-0500
committerConnor Brewster <cbrewster@hey.com>2024-04-20T18·49+0000
commit01239a4f6f871733231c01d6126c3ffedcc504b7 (patch)
treea720b02b967f7400dcbafdec89be35e10c6ba3d9 /tvix/glue/src/tvix_store_io.rs
parentb0bdeb2e895a4094247cf16fe41566b9f1b79f43 (diff)
fix(tvix): fix outdated comment and error in TvixStoreIO::open r/7986
This function was originally called `read_to_string` but was changed to
`open` to make it so that file contents aren't always held in memory.
A comment and error message were not updated to reflect the new name of
this method.

Change-Id: I3d86e2f6d7006c2e1513121fc3c62efcb7e7b9bb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11495
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to '')
-rw-r--r--tvix/glue/src/tvix_store_io.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tvix/glue/src/tvix_store_io.rs b/tvix/glue/src/tvix_store_io.rs
index 8f44d2fe83..87e9c85a53 100644
--- a/tvix/glue/src/tvix_store_io.rs
+++ b/tvix/glue/src/tvix_store_io.rs
@@ -536,13 +536,13 @@ impl EvalIO for TvixStoreIO {
                 .tokio_handle
                 .block_on(async { self.store_path_to_node(&store_path, &sub_path).await })?
             {
-                // depending on the node type, treat read_to_string differently
+                // depending on the node type, treat open differently
                 match node {
                     Node::Directory(_) => {
                         // This would normally be a io::ErrorKind::IsADirectory (still unstable)
                         Err(io::Error::new(
                             io::ErrorKind::Unsupported,
-                            format!("tried to read directory at {:?} to string", path),
+                            format!("tried to open directory at {:?}", path),
                         ))
                     }
                     Node::File(file_node) => {
@@ -581,7 +581,7 @@ impl EvalIO for TvixStoreIO {
                     }
                     Node::Symlink(_symlink_node) => Err(io::Error::new(
                         io::ErrorKind::Unsupported,
-                        "read_to_string for symlinks is unsupported",
+                        "open for symlinks is unsupported",
                     ))?,
                 }
             } else {