diff options
author | Florian Klink <flokli@flokli.de> | 2024-03-18T13·23+0200 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2024-03-18T16·10+0000 |
commit | d62c6e642deaae04edccd9256a7d193ce1b3656e (patch) | |
tree | a0d66d93d260d5a48e6a39b9573609073a2a9878 /tvix/store/src | |
parent | 499bc2f7ee263e468e444784daddc4ba66349d2c (diff) |
refactor(tvix/store/nar): use B3Digest in RenderError r/7731
Ensure consistent formatting of blake3 digests. It looks like we don't actually construct these error types anywhere, so no code needs to be refactored to it currently, but still good to be consistent. Change-Id: I49dc8a7f3cb4245ac06b9a6a44b72060434a3d32 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11193 Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/store/src')
-rw-r--r-- | tvix/store/src/nar/mod.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tvix/store/src/nar/mod.rs b/tvix/store/src/nar/mod.rs index c1a7fc2a933f..49bb92fb0f0f 100644 --- a/tvix/store/src/nar/mod.rs +++ b/tvix/store/src/nar/mod.rs @@ -1,4 +1,3 @@ -use data_encoding::BASE64; use tvix_castore::B3Digest; mod import; @@ -16,11 +15,11 @@ pub enum RenderError { #[error("unable to find directory {}, referred from {:?}", .0, .1)] DirectoryNotFound(B3Digest, bytes::Bytes), - #[error("unable to find blob {}, referred from {:?}", BASE64.encode(.0), .1)] - BlobNotFound([u8; 32], bytes::Bytes), + #[error("unable to find blob {}, referred from {:?}", .0, .1)] + BlobNotFound(B3Digest, bytes::Bytes), - #[error("unexpected size in metadata for blob {}, referred from {:?} returned, expected {}, got {}", BASE64.encode(.0), .1, .2, .3)] - UnexpectedBlobMeta([u8; 32], bytes::Bytes, u32, u32), + #[error("unexpected size in metadata for blob {}, referred from {:?} returned, expected {}, got {}", .0, .1, .2, .3)] + UnexpectedBlobMeta(B3Digest, bytes::Bytes, u32, u32), #[error("failure using the NAR writer: {0}")] NARWriterError(std::io::Error), |