about summary refs log tree commit diff
path: root/tvix/store/src/pathinfoservice/sled.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-06-17T10·20+0300
committerclbot <clbot@tvl.fyi>2023-06-19T14·29+0000
commitad687ccaf49f6cfd3b23083ddd543a840c2212ae (patch)
treece00017af6c5345bb2ccfe1404dd1b2e85f81e1c /tvix/store/src/pathinfoservice/sled.rs
parentb10f008b03f44192cb37cbd6cf1e55b6d03b80fa (diff)
chore(tvix/store/pathinfosvc): clippy r/6333
Change-Id: Ied4bed08e989791f832922da8776d2104035e28a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8812
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/store/src/pathinfoservice/sled.rs')
-rw-r--r--tvix/store/src/pathinfoservice/sled.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/tvix/store/src/pathinfoservice/sled.rs b/tvix/store/src/pathinfoservice/sled.rs
index 48db6b8b5cd8..3e5811b1d6ef 100644
--- a/tvix/store/src/pathinfoservice/sled.rs
+++ b/tvix/store/src/pathinfoservice/sled.rs
@@ -74,15 +74,13 @@ impl PathInfoService for SledPathInfoService {
         if url.path().is_empty() {
             Self::new_temporary(blob_service, directory_service)
                 .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(), blob_service, directory_service)
-                    .map_err(|e| Error::StorageError(e.to_string()))
-            }
+            Self::new(url.path().into(), blob_service, directory_service)
+                .map_err(|e| Error::StorageError(e.to_string()))
         }
     }