From 31d73cd443311c5ef4bfbd8c2b66e3b9691340ec Mon Sep 17 00:00:00 2001 From: edef Date: Wed, 8 May 2024 07:13:39 +0000 Subject: refactor(nix-compat/nar/reader): reuse prev_name allocation We reuse the prev_name allocation for Entry, instead of allocating and returning a separate Vec. We encode the `prev_name: None` case as an empty vector, since we don't allow empty names anyway, and the sorting is equivalent. Change-Id: I975b37ff873805f5ff099bc82128706891052247 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11607 Reviewed-by: Brian Olsen Reviewed-by: flokli Tested-by: BuildkiteCI --- tvix/tools/crunch-v2/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tvix/tools') diff --git a/tvix/tools/crunch-v2/src/main.rs b/tvix/tools/crunch-v2/src/main.rs index a5d538f6beac..5be8c28e293f 100644 --- a/tvix/tools/crunch-v2/src/main.rs +++ b/tvix/tools/crunch-v2/src/main.rs @@ -147,7 +147,7 @@ fn ingest(node: nar::Node, name: Vec, avg_chunk_size: u32) -> Result { directories.push(node); } -- cgit 1.4.1