refactor(tvix/store/import): use B3Digest in log_node

Change-Id: I2347bbae8e7d4e19eeed4a3fb13729d0a94feedd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11195
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
This commit is contained in:
Florian Klink 2024-03-18 15:34:36 +02:00 committed by clbot
parent a65c49fbc3
commit 3dd708690f

View file

@ -1,9 +1,7 @@
use std::path::Path;
use data_encoding::BASE64;
use tracing::{debug, instrument};
use tvix_castore::{
blobservice::BlobService, directoryservice::DirectoryService, proto::node::Node,
blobservice::BlobService, directoryservice::DirectoryService, proto::node::Node, B3Digest,
};
use nix_compat::store_path::{self, StorePath};
@ -19,7 +17,7 @@ pub fn log_node(node: &Node, path: &Path) {
debug!(
path = ?path,
name = ?directory_node.name,
digest = BASE64.encode(&directory_node.digest),
digest = %B3Digest::try_from(directory_node.digest.clone()).unwrap(),
"import successful",
)
}
@ -27,7 +25,7 @@ pub fn log_node(node: &Node, path: &Path) {
debug!(
path = ?path,
name = ?file_node.name,
digest = BASE64.encode(&file_node.digest),
digest = %B3Digest::try_from(file_node.digest.clone()).unwrap(),
"import successful"
)
}