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 <flokli@flokli.de> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									b0bdeb2e89
								
							
						
					
					
						commit
						01239a4f6f
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -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 {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue