From ea8fdb9304f17beb6d967ddaf8913512732e3432 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 21 Dec 2023 16:01:00 +0200 Subject: refactor(nix-compat/narinfo/fingerprint): move to StorePathRef With the introduction of StorePathRef::to_absolute_path(), there's no need to convert this StorePathRef to a StorePath first. Change-Id: I634c977c4b63858e4f329fd21726e0611b99da4a Reviewed-on: https://cl.tvl.fyi/c/depot/+/10388 Tested-by: BuildkiteCI Reviewed-by: edef Autosubmit: flokli --- tvix/nix-compat/src/narinfo/fingerprint.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tvix/nix-compat/src/narinfo/fingerprint.rs b/tvix/nix-compat/src/narinfo/fingerprint.rs index fdf221f5f256..bcbc2ce59fa5 100644 --- a/tvix/nix-compat/src/narinfo/fingerprint.rs +++ b/tvix/nix-compat/src/narinfo/fingerprint.rs @@ -11,12 +11,12 @@ pub fn fingerprint<'a, R: Iterator>>( ) -> String { format!( "1;{};sha256:{};{};{}", - store_path.to_owned().to_absolute_path(), // TODO: move to StorePathRef + store_path.to_absolute_path(), nixbase32::encode(nar_sha256), nar_size, // references are absolute paths, joined with `,`. references - .map(|r| r.to_owned().to_absolute_path()) + .map(|r| r.to_absolute_path()) .collect::>() .join(",") ) -- cgit 1.4.1