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/tests/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tvix/derivation/src/tests/mod.rs') diff --git a/tvix/derivation/src/tests/mod.rs b/tvix/derivation/src/tests/mod.rs index ce39afdd2854..644e0685d735 100644 --- a/tvix/derivation/src/tests/mod.rs +++ b/tvix/derivation/src/tests/mod.rs @@ -313,7 +313,7 @@ fn path_with_zero_references() { // nix-repl> builtins.toFile "foo" "bar" // "/nix/store/vxjiwkjkn7x4079qvh1jkl5pn05j2aw0-foo" - let store_path = crate::path_with_references("foo", "bar", vec![]) + let store_path = crate::path_with_references("foo", "bar", Vec::::new()) .expect("path_with_references() should succeed"); assert_eq!( @@ -329,7 +329,7 @@ fn path_with_non_zero_references() { // nix-repl> builtins.toFile "baz" "${builtins.toFile "foo" "bar"}" // "/nix/store/5xd714cbfnkz02h2vbsj4fm03x3f15nf-baz" - let inner = crate::path_with_references("foo", "bar", vec![]) + let inner = crate::path_with_references("foo", "bar", Vec::::new()) .expect("path_with_references() should succeed"); let inner_path = inner.to_absolute_path(); -- cgit 1.4.1