mirror of
https://github.com/getnora-io/nora.git
synced 2026-04-12 15:00:31 +00:00
style: fix formatting
This commit is contained in:
@@ -67,7 +67,9 @@ impl Storage {
|
||||
secret_key: Option<&str>,
|
||||
) -> Self {
|
||||
Self {
|
||||
inner: Arc::new(S3Storage::new(s3_url, bucket, region, access_key, secret_key)),
|
||||
inner: Arc::new(S3Storage::new(
|
||||
s3_url, bucket, region, access_key, secret_key,
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,8 @@ impl S3Storage {
|
||||
.header("x-amz-date", ×tamp)
|
||||
.header("x-amz-content-sha256", &payload_hash);
|
||||
|
||||
if let Some(auth) = self.sign_request(method.as_str(), key, &payload_hash, ×tamp, &date)
|
||||
if let Some(auth) =
|
||||
self.sign_request(method.as_str(), key, &payload_hash, ×tamp, &date)
|
||||
{
|
||||
request = request.header("Authorization", auth);
|
||||
}
|
||||
@@ -186,9 +187,7 @@ impl StorageBackend for S3Storage {
|
||||
}
|
||||
|
||||
async fn get(&self, key: &str) -> Result<Bytes> {
|
||||
let response = self
|
||||
.signed_request(reqwest::Method::GET, key, None)
|
||||
.await?;
|
||||
let response = self.signed_request(reqwest::Method::GET, key, None).await?;
|
||||
|
||||
if response.status().is_success() {
|
||||
response
|
||||
|
||||
Reference in New Issue
Block a user