about summary refs log tree commit diff
path: root/tvix/nix-compat/src/narinfo
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-12-21T14·01+0200
committerclbot <clbot@tvl.fyi>2023-12-21T16·28+0000
commitea8fdb9304f17beb6d967ddaf8913512732e3432 (patch)
treedf8708e8241feb45c512e1f20ca91df91e281905 /tvix/nix-compat/src/narinfo
parent91deb67de92c4deaf24ec16c690c4887c796ccff (diff)
refactor(nix-compat/narinfo/fingerprint): move to StorePathRef r/7235
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 <edef@edef.eu>
Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/nix-compat/src/narinfo')
-rw-r--r--tvix/nix-compat/src/narinfo/fingerprint.rs4
1 files 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<Item = &'a StorePathRef<'a>>>(
 ) -> 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::<Vec<String>>()
             .join(",")
     )