From 71093a513a37ee72dc7cbd55af0745e68e9ca265 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 17 Jun 2023 13:20:21 +0300 Subject: chore(tvix/store/blobsvc): clippy Change-Id: Ie384bdd27e1e9282ceda83edc74ffaad387f352b Reviewed-on: https://cl.tvl.fyi/c/depot/+/8810 Tested-by: BuildkiteCI Reviewed-by: tazjin Autosubmit: flokli --- tvix/store/src/blobservice/sled.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'tvix/store/src/blobservice/sled.rs') diff --git a/tvix/store/src/blobservice/sled.rs b/tvix/store/src/blobservice/sled.rs index 6b38a5e0ed81..2b8f9e7bbb13 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())) } } -- cgit 1.4.1