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 <me@griff.name> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
This commit is contained in:
parent
17a7dac94f
commit
31d73cd443
8 changed files with 73 additions and 50 deletions
|
|
@ -82,7 +82,6 @@ where
|
|||
Ok(buf)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(crate) async fn read_bytes_buf<'a, const N: usize, R: ?Sized>(
|
||||
reader: &mut R,
|
||||
buf: &'a mut [MaybeUninit<u8>; N],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue