diff options
author | edef <edef@edef.eu> | 2024-04-29T17·34+0000 |
---|---|---|
committer | edef <edef@edef.eu> | 2024-05-08T06·03+0000 |
commit | 51e0f78e9317c1234bc982dcaa280c0d3674d164 (patch) | |
tree | 057023b4f0aa6545a757f69da0978d5028618590 /tvix/store/src | |
parent | ebad318ab3accf34dff84a49d18b96a7efd15c22 (diff) |
feat(nix-compat/wire/bytes/reader): support buffered reading r/8086
If our underlying reader supports AsyncBufRead, then we can too. Change-Id: If4b948c983400ca591c1c475bbcf7dc00d562040 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11545 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/store/src')
-rw-r--r-- | tvix/store/src/nar/import.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tvix/store/src/nar/import.rs b/tvix/store/src/nar/import.rs index cc62c1a4e902..7a9f1231e76a 100644 --- a/tvix/store/src/nar/import.rs +++ b/tvix/store/src/nar/import.rs @@ -70,8 +70,7 @@ where } => { let (digest, size) = { let mut blob_writer = blob_service.open_write().await; - // TODO(edef): fix the AsyncBufRead implementation of nix_compat::wire::BytesReader - let size = tokio::io::copy(&mut reader, &mut blob_writer).await?; + let size = tokio::io::copy_buf(&mut reader, &mut blob_writer).await?; (blob_writer.close().await?, size) }; |