From 20c98a51bf36ff6e74c4e62275ff31e7c43802c3 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 31 Dec 2023 18:23:02 +0200 Subject: refactor(tvix/store/bin): don't reconstruct StorePath twice We already have that data in output_path. Change-Id: Iadf615551f0b44d539098446ff5926994deb606d Reviewed-on: https://cl.tvl.fyi/c/depot/+/10508 Tested-by: BuildkiteCI Autosubmit: flokli Reviewed-by: raitobezarius --- tvix/store/src/bin/tvix-store.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'tvix/store/src/bin') diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs index 919294f697b3..ab80415cf2e5 100644 --- a/tvix/store/src/bin/tvix-store.rs +++ b/tvix/store/src/bin/tvix-store.rs @@ -2,7 +2,6 @@ use clap::Subcommand; use data_encoding::BASE64; use futures::future::try_join_all; use nix_compat::store_path; -use nix_compat::store_path::StorePath; use std::path::Path; use std::path::PathBuf; use std::sync::Arc; @@ -17,7 +16,6 @@ use tvix_castore::proto::directory_service_server::DirectoryServiceServer; use tvix_castore::proto::node::Node; use tvix_castore::proto::GRPCBlobServiceWrapper; use tvix_castore::proto::GRPCDirectoryServiceWrapper; -use tvix_castore::proto::NamedNode; use tvix_store::pathinfoservice::PathInfoService; use tvix_store::proto::nar_info; use tvix_store::proto::path_info_service_server::PathInfoServiceServer; @@ -321,12 +319,7 @@ async fn main() -> Result<(), Box> { log_node(&node, &path); - println!( - "{}", - StorePath::from_bytes(node.get_name()) - .unwrap() - .to_absolute_path() - ); + println!("{}", output_path.to_absolute_path()); Ok(()) } -- cgit 1.4.1