From a0801ae2203025095c9b4aad47baaebf39e5b6a9 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 18 May 2023 19:51:54 +0300 Subject: refactor(tvix/store/blobsvc/sled): clippy Change-Id: Icfea8ceb6b827a645c6f10efae741f6fa2114fad Reviewed-on: https://cl.tvl.fyi/c/depot/+/8590 Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/store/src/blobservice/sled.rs | 10 +++++----- 1 file 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())) } } -- cgit 1.4.1