about summary refs log tree commit diff
path: root/tvix/castore/src
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-03-02T15·59+0200
committerflokli <flokli@flokli.de>2024-03-02T17·05+0000
commit53fb9ff4c6a2aaa4e0eaa1fe782b3104b95e5fe8 (patch)
tree5b4dd2766a64e3f0f2d0658fd907679a61db6fdd /tvix/castore/src
parent982459d3438c478aa208bc61a0de1fe34a8d05a0 (diff)
feat(tvix/castore/blobsvc): BlobReader for more trivial types r/7627
Change-Id: I80e4f26c41a504fa4c6a013c2a1e76de613ba294
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11078
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/castore/src')
-rw-r--r--tvix/castore/src/blobservice/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/tvix/castore/src/blobservice/mod.rs b/tvix/castore/src/blobservice/mod.rs
index 7685ff40d60f..15d5ab459d07 100644
--- a/tvix/castore/src/blobservice/mod.rs
+++ b/tvix/castore/src/blobservice/mod.rs
@@ -77,5 +77,7 @@ pub trait BlobWriter: tokio::io::AsyncWrite + Send + Unpin {
 pub trait BlobReader: tokio::io::AsyncRead + tokio::io::AsyncSeek + Send + Unpin + 'static {}
 
 /// A [`io::Cursor<Vec<u8>>`] can be used as a BlobReader.
+impl BlobReader for io::Cursor<&'static [u8]> {}
+impl BlobReader for io::Cursor<&'static [u8; 0]> {}
 impl BlobReader for io::Cursor<Vec<u8>> {}
 impl BlobReader for tokio::fs::File {}