about summary refs log tree commit diff
path: root/tvix/castore/src/proto
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/castore/src/proto')
-rw-r--r--tvix/castore/src/proto/grpc_blobservice_wrapper.rs3
-rw-r--r--tvix/castore/src/proto/tests/grpc_blobservice.rs2
-rw-r--r--tvix/castore/src/proto/tests/grpc_directoryservice.rs6
3 files changed, 5 insertions, 6 deletions
diff --git a/tvix/castore/src/proto/grpc_blobservice_wrapper.rs b/tvix/castore/src/proto/grpc_blobservice_wrapper.rs
index e7092bec1481..a37cc299b8a3 100644
--- a/tvix/castore/src/proto/grpc_blobservice_wrapper.rs
+++ b/tvix/castore/src/proto/grpc_blobservice_wrapper.rs
@@ -167,8 +167,7 @@ impl super::blob_service_server::BlobService for GRPCBlobServiceWrapper {
                 warn!("error closing stream: {}", e);
                 Status::internal("error closing stream")
             })
-            .await?
-            .to_vec();
+            .await?;
 
         Ok(Response::new(super::PutBlobResponse {
             digest: digest.into(),
diff --git a/tvix/castore/src/proto/tests/grpc_blobservice.rs b/tvix/castore/src/proto/tests/grpc_blobservice.rs
index a7816bd1e961..fb202b7d8a51 100644
--- a/tvix/castore/src/proto/tests/grpc_blobservice.rs
+++ b/tvix/castore/src/proto/tests/grpc_blobservice.rs
@@ -54,7 +54,7 @@ async fn put_read_stat() {
         .expect("must succeed")
         .into_inner();
 
-    assert_eq!(BLOB_A_DIGEST.to_vec(), put_resp.digest);
+    assert_eq!(BLOB_A_DIGEST.as_slice(), put_resp.digest);
 
     // Stat for the digest of A.
     // We currently don't ask for more granular chunking data, as we don't
diff --git a/tvix/castore/src/proto/tests/grpc_directoryservice.rs b/tvix/castore/src/proto/tests/grpc_directoryservice.rs
index e443b4b1916a..1b522472be5b 100644
--- a/tvix/castore/src/proto/tests/grpc_directoryservice.rs
+++ b/tvix/castore/src/proto/tests/grpc_directoryservice.rs
@@ -74,7 +74,7 @@ async fn put_get() {
     };
 
     // the sent root_digest should match the calculated digest
-    assert_eq!(put_resp.root_digest, DIRECTORY_A.digest().to_vec());
+    assert_eq!(put_resp.root_digest, DIRECTORY_A.digest().as_slice());
 
     // get it back
     let items = get_directories(
@@ -117,7 +117,7 @@ async fn put_get_multiple() {
             .into_inner()
     };
 
-    assert_eq!(DIRECTORY_B.digest().to_vec(), put_resp.root_digest);
+    assert_eq!(DIRECTORY_B.digest().as_slice(), put_resp.root_digest);
 
     // now, request b, first in non-recursive mode.
     let items = get_directories(
@@ -167,7 +167,7 @@ async fn put_get_dedup() {
     };
 
     assert_eq!(
-        DIRECTORY_C.digest().to_vec(),
+        DIRECTORY_C.digest().as_slice(),
         put_resp.into_inner().root_digest
     );