This does import the contents into the store, so it should belong in there. While moving, I also noticed the code copying to the BlobService can be shared with the one used when importing a blob via import helper. It was a bit hidden - due to the contents being available as a bytes, we used a Cursor and wrote it with tokio::io::copy. However, Cursor implements both AsyncRead and Read, so we can factor out the copying code into a copy_to_blobservice helper function and use it in both places. The output name being wrong error kind arguably is still a bit misplaced here, but that's left for later. Change-Id: Iec3c422c12270ee111f864d2b78c0861f78edfa4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/13254 Reviewed-by: Domen Kožar <domen@cachix.org> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz> |
||
|---|---|---|
| .. | ||
| benches | ||
| src | ||
| build.rs | ||
| Cargo.toml | ||
| default.nix | ||