From 9f75973e4a93b0625f100e9d01f049dac4ac79e4 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 23 Jan 2023 16:17:43 +0300 Subject: refactor(tvix/derivation): relax bounds for reference iterator This makes it easier to pass owned strings if that's what we have. Change-Id: Ia7351ff2681292d16534ec50fe60b926b683bb9a Reviewed-on: https://cl.tvl.fyi/c/depot/+/7908 Reviewed-by: flokli Tested-by: BuildkiteCI --- tvix/derivation/src/derivation.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tvix/derivation/src/derivation.rs') diff --git a/tvix/derivation/src/derivation.rs b/tvix/derivation/src/derivation.rs index f2d88e301fff..45fcfb6b9f4b 100644 --- a/tvix/derivation/src/derivation.rs +++ b/tvix/derivation/src/derivation.rs @@ -75,7 +75,7 @@ fn build_store_path( /// Build a store path for a literal text file in the store that may /// contain references. -pub fn path_with_references<'a, I: IntoIterator, C: AsRef<[u8]>>( +pub fn path_with_references, I: IntoIterator, C: AsRef<[u8]>>( name: &str, content: C, references: I, @@ -84,7 +84,7 @@ pub fn path_with_references<'a, I: IntoIterator, C: AsRef<[u8]>> for reference in references { s.push(':'); - s.push_str(reference); + s.push_str(reference.as_ref()); } let content_digest = { -- cgit 1.4.1