refactor(tvix/cli): remove unneeded clone

Change-Id: I6f4cb24bdd636af8918a2ade44075af92161c97d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7965
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2023-01-31 12:27:08 +01:00 committed by flokli
parent 4da1e64c03
commit 6fa91349a9

View file

@ -124,7 +124,7 @@ fn populate_output_configuration(
// algo is set. Assume the digest is set to some nixbase32. // algo is set. Assume the digest is set to some nixbase32.
// TODO: more validation here // TODO: more validation here
(digest.to_string(), algo.to_string()) (digest, algo)
} }
Ok(sri_parsed) => { Ok(sri_parsed) => {
// We don't support more than one SRI hash // 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 set, it needs to match what the SRI says
if !algo.is_empty() && algo != sri_parsed_hash.algorithm.to_string() { if !algo.is_empty() && algo != sri_parsed_hash.algorithm.to_string() {
return Err(Error::ConflictingSRIHashAlgo( return Err(Error::ConflictingSRIHashAlgo(
algo.to_string(), algo,
sri_parsed_hash.algorithm.to_string(), sri_parsed_hash.algorithm.to_string(),
) )
.into()); .into());