diff options
author | Florian Klink <flokli@flokli.de> | 2023-12-12T13·48+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-12-12T18·06+0000 |
commit | 30d82efa774f72e6d33c2070b32d365121654c54 (patch) | |
tree | f0842e93b043c1dcad569127a9904f06c8112a4b /tvix/castore/src/import.rs | |
parent | 91456c3520a03e0f3b73224f1d80c56a5392fe32 (diff) |
refactor(tvix/castore/blobservice): use io::Result in trait r/7207
For all these calls, the caller has enough context about what it did, so it should be fine to use io::Result here. We pretty much only constructed crate::Error::StorageError before anyways, so this conveys *more* information. Change-Id: I5cabb3769c9c2314bab926d34dda748fda9d3ccc Reviewed-on: https://cl.tvl.fyi/c/depot/+/10328 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/castore/src/import.rs')
-rw-r--r-- | tvix/castore/src/import.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tvix/castore/src/import.rs b/tvix/castore/src/import.rs index 675dd0ec8be8..a31bb22a622a 100644 --- a/tvix/castore/src/import.rs +++ b/tvix/castore/src/import.rs @@ -117,7 +117,10 @@ async fn process_entry<'a>( return Err(Error::UnableToRead(entry.path().to_path_buf(), e)); }; - let digest = writer.close().await?; + let digest = writer + .close() + .await + .map_err(|e| Error::UnableToRead(entry.path().to_path_buf(), e))?; return Ok(Node::File(FileNode { name: entry.file_name().as_bytes().to_vec().into(), |