From 01239a4f6f871733231c01d6126c3ffedcc504b7 Mon Sep 17 00:00:00 2001 From: Connor Brewster Date: Sat, 20 Apr 2024 13:39:03 -0500 Subject: fix(tvix): fix outdated comment and error in TvixStoreIO::open 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 Tested-by: BuildkiteCI --- tvix/glue/src/tvix_store_io.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tvix') diff --git a/tvix/glue/src/tvix_store_io.rs b/tvix/glue/src/tvix_store_io.rs index 8f44d2fe834d..87e9c85a53c8 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 { -- cgit 1.4.1