about summary refs log tree commit diff
path: root/tvix/castore/src/blobservice/chunked_reader.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-03-18T13·17+0200
committerflokli <flokli@flokli.de>2024-03-18T16·10+0000
commit499bc2f7ee263e468e444784daddc4ba66349d2c (patch)
treebeba6cf3aa9e96ec93ac2a9b9d96b94532fb4010 /tvix/castore/src/blobservice/chunked_reader.rs
parent8d177a18a5bae595e9662b8a6a38479517e7695f (diff)
refactor(tvix/castore/blobsvc): use B3Digest Display impl r/7730
We don't need to use BASE64 here on our own, B3Digest has a Display
impl.

This will also make sure the `b3:` digest is present in field values.

Change-Id: I0ce6ee0f7e7e99fb9b16872953a1b742e99be291
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11192
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/castore/src/blobservice/chunked_reader.rs')
-rw-r--r--tvix/castore/src/blobservice/chunked_reader.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/tvix/castore/src/blobservice/chunked_reader.rs b/tvix/castore/src/blobservice/chunked_reader.rs
index 6ca0d2003226..e2a9f614c456 100644
--- a/tvix/castore/src/blobservice/chunked_reader.rs
+++ b/tvix/castore/src/blobservice/chunked_reader.rs
@@ -1,4 +1,3 @@
-use data_encoding::BASE64;
 use futures::TryStreamExt;
 use pin_project_lite::pin_project;
 use tokio::io::{AsyncRead, AsyncSeekExt};
@@ -222,10 +221,7 @@ where
                         .open_read(&chunk_digest.to_owned())
                         .await?
                         .ok_or_else(|| {
-                            warn!(
-                                chunk.digest = BASE64.encode(chunk_digest.as_slice()),
-                                "chunk not found"
-                            );
+                            warn!(chunk.digest = %chunk_digest, "chunk not found");
                             std::io::Error::new(std::io::ErrorKind::NotFound, "chunk not found")
                         })?;