refactor(tvix/castore/blobservice): use io::Result in trait

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>
This commit is contained in:
Florian Klink 2023-12-12 15:48:01 +02:00 committed by clbot
parent 91456c3520
commit 30d82efa77
7 changed files with 52 additions and 56 deletions

View file

@ -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(),