about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-05-18T16·51+0300
committerflokli <flokli@flokli.de>2023-05-18T19·29+0000
commita0801ae2203025095c9b4aad47baaebf39e5b6a9 (patch)
treea32960c4dc20ddd51feecf5c0bd783fd6dc72fa0 /tvix
parent2e09e94aadddb6e5e4c3e746a2f4759ede736973 (diff)
refactor(tvix/store/blobsvc/sled): clippy r/6163
Change-Id: Icfea8ceb6b827a645c6f10efae741f6fa2114fad
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8590
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix')
-rw-r--r--tvix/store/src/blobservice/sled.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/tvix/store/src/blobservice/sled.rs b/tvix/store/src/blobservice/sled.rs
index c229f799de98..0f9d8671a82b 100644
--- a/tvix/store/src/blobservice/sled.rs
+++ b/tvix/store/src/blobservice/sled.rs
@@ -86,13 +86,13 @@ impl io::Write for SledBlobWriter {
 impl BlobWriter for SledBlobWriter {
     fn close(self) -> Result<[u8; 32], Error> {
         let digest = self.hasher.finalize();
-        self.db.insert(digest.as_bytes(), self.buf).map_err(|e| {
-            Error::StorageError(format!("unable to insert blob: {}", e.to_string()))
-        })?;
+        self.db
+            .insert(digest.as_bytes(), self.buf)
+            .map_err(|e| Error::StorageError(format!("unable to insert blob: {}", e)))?;
 
-        Ok(digest
+        digest
             .to_owned()
             .try_into()
-            .map_err(|_| Error::StorageError("invalid digest length in response".to_string()))?)
+            .map_err(|_| Error::StorageError("invalid digest length in response".to_string()))
     }
 }