about summary refs log tree commit diff
path: root/tvix/castore/src
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/castore/src')
-rw-r--r--tvix/castore/src/fs/mod.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/tvix/castore/src/fs/mod.rs b/tvix/castore/src/fs/mod.rs
index 632dad84cf86..28528f38af1d 100644
--- a/tvix/castore/src/fs/mod.rs
+++ b/tvix/castore/src/fs/mod.rs
@@ -490,12 +490,11 @@ where
                 let span = info_span!("read", blob.digest = %blob_digest);
                 let _enter = span.enter();
 
-                let blob_service = self.blob_service.clone();
-                let blob_digest = blob_digest.clone();
-
-                let task = self
-                    .tokio_handle
-                    .spawn(async move { blob_service.as_ref().open_read(&blob_digest).await });
+                let task = self.tokio_handle.spawn({
+                    let blob_service = self.blob_service.clone();
+                    let blob_digest = blob_digest.clone();
+                    async move { blob_service.as_ref().open_read(&blob_digest).await }
+                });
 
                 let blob_reader = self.tokio_handle.block_on(task).unwrap();