aboutsummaryrefslogtreecommitdiff
path: root/src/api/signature.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-03-12 21:52:19 +0100
committerAlex Auvolat <alex@adnab.me>2021-03-12 21:52:19 +0100
commit831eb35763fdaeecb7b6d6aa13ebd78da14db04e (patch)
tree375405c95250acb49e627c91c8f457c8fb9e2d1b /src/api/signature.rs
parentc475471e7a8e7544f2be490898f4249cf27a17e9 (diff)
downloadgarage-831eb35763fdaeecb7b6d6aa13ebd78da14db04e.tar.gz
garage-831eb35763fdaeecb7b6d6aa13ebd78da14db04e.zip
cargo fmt
Diffstat (limited to 'src/api/signature.rs')
-rw-r--r--src/api/signature.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/api/signature.rs b/src/api/signature.rs
index 04d6666c..b3d61ff4 100644
--- a/src/api/signature.rs
+++ b/src/api/signature.rs
@@ -106,8 +106,10 @@ pub async fn check_signature(
} else {
let bytes = hex::decode(authorization.content_sha256)
.ok_or_bad_request("Invalid content sha256 hash")?;
- Some(Hash::try_from(&bytes[..])
- .ok_or(Error::BadRequest(format!("Invalid content sha256 hash")))?)
+ Some(
+ Hash::try_from(&bytes[..])
+ .ok_or(Error::BadRequest(format!("Invalid content sha256 hash")))?,
+ )
};
Ok((key, content_sha256))