From 6fa91349a9b97e74cf3dd9833da19b3450045e20 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 31 Jan 2023 12:27:08 +0100 Subject: [PATCH] refactor(tvix/cli): remove unneeded clone Change-Id: I6f4cb24bdd636af8918a2ade44075af92161c97d Reviewed-on: https://cl.tvl.fyi/c/depot/+/7965 Reviewed-by: tazjin Tested-by: BuildkiteCI --- tvix/cli/src/derivation.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tvix/cli/src/derivation.rs b/tvix/cli/src/derivation.rs index 3eafc8559..b245d9d5d 100644 --- a/tvix/cli/src/derivation.rs +++ b/tvix/cli/src/derivation.rs @@ -124,7 +124,7 @@ fn populate_output_configuration( // algo is set. Assume the digest is set to some nixbase32. // TODO: more validation here - (digest.to_string(), algo.to_string()) + (digest, algo) } Ok(sri_parsed) => { // We don't support more than one SRI hash @@ -148,7 +148,7 @@ fn populate_output_configuration( // if algo is set, it needs to match what the SRI says if !algo.is_empty() && algo != sri_parsed_hash.algorithm.to_string() { return Err(Error::ConflictingSRIHashAlgo( - algo.to_string(), + algo, sri_parsed_hash.algorithm.to_string(), ) .into());