about summary refs log tree commit diff
path: root/tvix/store/src/blobservice/sled.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store/src/blobservice/sled.rs')
-rw-r--r--tvix/store/src/blobservice/sled.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/tvix/store/src/blobservice/sled.rs b/tvix/store/src/blobservice/sled.rs
index 6b38a5e0ed..2b8f9e7bbb 100644
--- a/tvix/store/src/blobservice/sled.rs
+++ b/tvix/store/src/blobservice/sled.rs
@@ -47,14 +47,12 @@ impl BlobService for SledBlobService {
         // TODO: expose compression and other parameters as URL parameters, drop new and new_temporary?
         if url.path().is_empty() {
             Self::new_temporary().map_err(|e| Error::StorageError(e.to_string()))
+        } else if url.path() == "/" {
+            Err(crate::Error::StorageError(
+                "cowardly refusing to open / with sled".to_string(),
+            ))
         } else {
-            if url.path() == "/" {
-                Err(crate::Error::StorageError(
-                    "cowardly refusing to open / with sled".to_string(),
-                ))
-            } else {
-                Self::new(url.path().into()).map_err(|e| Error::StorageError(e.to_string()))
-            }
+            Self::new(url.path().into()).map_err(|e| Error::StorageError(e.to_string()))
         }
     }