diff options
author | Florian Klink <flokli@flokli.de> | 2023-02-16T16·38+0100 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2023-03-10T10·58+0000 |
commit | bc3f71838f76b9ec141e1012f49e2a24d067c3c8 (patch) | |
tree | 66a837570fd32037cea17316383cfc3d699f1436 /tvix/store/src | |
parent | df3223fd681f64d54f6f393e53647d3a487eff25 (diff) |
refactor(tvix/store): don't use anyhow::Result<()> in tests r/5916
It's much easier to just unwrap the TempDir::new() result. Change-Id: I7b05bc18f3146401e30e1cc2bb412503c5171a66 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8128 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/store/src')
-rw-r--r-- | tvix/store/src/tests/nar_renderer.rs | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/tvix/store/src/tests/nar_renderer.rs b/tvix/store/src/tests/nar_renderer.rs index 43afdefbf930..e19dd88777ae 100644 --- a/tvix/store/src/tests/nar_renderer.rs +++ b/tvix/store/src/tests/nar_renderer.rs @@ -62,8 +62,8 @@ fn gen_directory_service(p: &Path) -> impl DirectoryService { } #[test] -fn single_symlink() -> anyhow::Result<()> { - let tmpdir = TempDir::new()?; +fn single_symlink() { + let tmpdir = TempDir::new().unwrap(); let renderer = NARRenderer::new( gen_blob_service(tmpdir.path()), gen_chunk_service(tmpdir.path()), @@ -98,12 +98,11 @@ fn single_symlink() -> anyhow::Result<()> { 1, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0 // ")" ] ); - Ok(()) } #[test] -fn single_file() -> anyhow::Result<()> { - let tmpdir = TempDir::new()?; +fn single_file() { + let tmpdir = TempDir::new().unwrap(); let blob_service = gen_blob_service(tmpdir.path()); let chunk_service = gen_chunk_service(tmpdir.path()); @@ -158,13 +157,11 @@ fn single_file() -> anyhow::Result<()> { 1, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0 // ")" ] ); - - Ok(()) } #[test] -fn test_complicated() -> anyhow::Result<()> { - let tmpdir = TempDir::new()?; +fn test_complicated() { + let tmpdir = TempDir::new().unwrap(); let blob_service = gen_blob_service(tmpdir.path()); let chunk_service = gen_chunk_service(tmpdir.path()); @@ -268,6 +265,4 @@ fn test_complicated() -> anyhow::Result<()> { 1, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0 // ")" ] ); - - Ok(()) } |