about summary refs log tree commit diff
path: root/tvix/store/src/directoryservice/sled.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store/src/directoryservice/sled.rs')
-rw-r--r--tvix/store/src/directoryservice/sled.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/tvix/store/src/directoryservice/sled.rs b/tvix/store/src/directoryservice/sled.rs
index 6dc09ed646c3..e741434eabb5 100644
--- a/tvix/store/src/directoryservice/sled.rs
+++ b/tvix/store/src/directoryservice/sled.rs
@@ -49,14 +49,12 @@ impl DirectoryService for SledDirectoryService {
         // 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()))
         }
     }