From 540e5669007a5f21b24bb8c63fd89756d0176866 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 25 Jun 2024 21:48:45 +0300 Subject: refactor(tvix/glue): take &CAHash, not CAHash We use a bit less cloning that way. Change-Id: I28bf99577e4a481e35fbf99d0724adab5502a1bd Reviewed-on: https://cl.tvl.fyi/c/depot/+/11874 Reviewed-by: Connor Brewster Tested-by: BuildkiteCI Reviewed-by: Ilan Joselevich --- tvix/store/src/import.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tvix/store/src/import.rs') diff --git a/tvix/store/src/import.rs b/tvix/store/src/import.rs index 9d7a995581c8..70a97982e642 100644 --- a/tvix/store/src/import.rs +++ b/tvix/store/src/import.rs @@ -81,7 +81,7 @@ pub fn path_to_name(path: &Path) -> std::io::Result<&str> { pub fn derive_nar_ca_path_info( nar_size: u64, nar_sha256: [u8; 32], - ca: Option, + ca: Option<&CAHash>, root_node: Node, ) -> PathInfo { // assemble the [crate::proto::PathInfo] object. @@ -145,7 +145,7 @@ where let path_info = derive_nar_ca_path_info( nar_size, nar_sha256, - Some(CAHash::Nar(NixHash::Sha256(nar_sha256))), + Some(&CAHash::Nar(NixHash::Sha256(nar_sha256))), root_node, ); -- cgit 1.4.1