diff options
author | Yureka <tvl@yuka.dev> | 2024-07-18T17·09+0200 |
---|---|---|
committer | yuka <tvl@yuka.dev> | 2024-07-18T19·19+0000 |
commit | 168e4fda5909e535f33051051ef426e221ef20d4 (patch) | |
tree | e23b8ad4ced3f4232bdb0ad186f3b63f693c57e5 /tvix/castore/src/tests/import.rs | |
parent | 79317be214ce2f1e3347438319d3482bb773a649 (diff) |
refactor(tvix): use composition & registry for from_addr r/8368
Change-Id: I3c94ecb5958294b5973c6fcdf5ee9c0d37fa54ad Reviewed-on: https://cl.tvl.fyi/c/depot/+/11976 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Autosubmit: yuka <yuka@yuka.dev>
Diffstat (limited to 'tvix/castore/src/tests/import.rs')
-rw-r--r-- | tvix/castore/src/tests/import.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tvix/castore/src/tests/import.rs b/tvix/castore/src/tests/import.rs index 8b3bd5ce0ffc..72fb06aea877 100644 --- a/tvix/castore/src/tests/import.rs +++ b/tvix/castore/src/tests/import.rs @@ -4,7 +4,6 @@ use crate::fixtures::*; use crate::import::fs::ingest_path; use crate::proto; -use std::sync::Arc; use tempfile::TempDir; #[cfg(target_family = "unix")] @@ -26,7 +25,7 @@ async fn symlink() { .unwrap(); let root_node = ingest_path( - Arc::from(blob_service), + blob_service, directory_service, tmpdir.path().join("doesntmatter"), ) @@ -44,8 +43,7 @@ async fn symlink() { #[tokio::test] async fn single_file() { - let blob_service = - Arc::from(blobservice::from_addr("memory://").await.unwrap()) as Arc<dyn BlobService>; + let blob_service = blobservice::from_addr("memory://").await.unwrap(); let directory_service = directoryservice::from_addr("memory://").await.unwrap(); let tmpdir = TempDir::new().unwrap(); @@ -77,8 +75,7 @@ async fn single_file() { #[cfg(target_family = "unix")] #[tokio::test] async fn complicated() { - let blob_service = - Arc::from(blobservice::from_addr("memory://").await.unwrap()) as Arc<dyn BlobService>; + let blob_service = blobservice::from_addr("memory://").await.unwrap(); let directory_service = directoryservice::from_addr("memory://").await.unwrap(); let tmpdir = TempDir::new().unwrap(); |