refactor(tvix/store/blobsvc/sled): clippy
Change-Id: Icfea8ceb6b827a645c6f10efae741f6fa2114fad Reviewed-on: https://cl.tvl.fyi/c/depot/+/8590 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
2e09e94aad
commit
a0801ae220
1 changed files with 5 additions and 5 deletions
|
@ -86,13 +86,13 @@ impl io::Write for SledBlobWriter {
|
||||||
impl BlobWriter for SledBlobWriter {
|
impl BlobWriter for SledBlobWriter {
|
||||||
fn close(self) -> Result<[u8; 32], Error> {
|
fn close(self) -> Result<[u8; 32], Error> {
|
||||||
let digest = self.hasher.finalize();
|
let digest = self.hasher.finalize();
|
||||||
self.db.insert(digest.as_bytes(), self.buf).map_err(|e| {
|
self.db
|
||||||
Error::StorageError(format!("unable to insert blob: {}", e.to_string()))
|
.insert(digest.as_bytes(), self.buf)
|
||||||
})?;
|
.map_err(|e| Error::StorageError(format!("unable to insert blob: {}", e)))?;
|
||||||
|
|
||||||
Ok(digest
|
digest
|
||||||
.to_owned()
|
.to_owned()
|
||||||
.try_into()
|
.try_into()
|
||||||
.map_err(|_| Error::StorageError("invalid digest length in response".to_string()))?)
|
.map_err(|_| Error::StorageError("invalid digest length in response".to_string()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue