Skip to content

Commit 4c0f5c6

Browse files
committed
fmt
1 parent 7a66428 commit 4c0f5c6

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

src/s3/lib.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
use chrono::prelude::Utc;
44
use hmac::{Hmac, Mac, NewMac};
5-
use sha1::Sha1;
65
use reqwest::{
76
blocking::{Body, Client, Response},
87
header,
98
};
9+
use sha1::Sha1;
1010

1111
pub use reqwest::Error;
1212

@@ -98,14 +98,7 @@ impl Bucket {
9898
)
9999
}
100100

101-
fn auth(
102-
&self,
103-
verb: &str,
104-
date: &str,
105-
path: &str,
106-
md5: &str,
107-
content_type: &str,
108-
) -> String {
101+
fn auth(&self, verb: &str, date: &str, path: &str, md5: &str, content_type: &str) -> String {
109102
let string = format!(
110103
"{verb}\n{md5}\n{ty}\n{date}\n{headers}{resource}",
111104
verb = verb,
@@ -117,8 +110,7 @@ impl Bucket {
117110
);
118111
let signature = {
119112
let key = self.secret_key.as_bytes();
120-
let mut h = Hmac::<Sha1>::new_varkey(key)
121-
.expect("HMAC can take key of any size");
113+
let mut h = Hmac::<Sha1>::new_varkey(key).expect("HMAC can take key of any size");
122114
h.update(string.as_bytes());
123115
let res = h.finalize().into_bytes();
124116
base64::encode(&res)

src/uploaders.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use conduit::RequestExt;
22
use flate2::read::GzDecoder;
3-
use sha2::{Sha256, Digest};
43
use reqwest::{blocking::Client, header};
4+
use sha2::{Digest, Sha256};
55

66
use crate::util::errors::{cargo_err, internal, AppResult, ChainError};
77
use crate::util::{Error, LimitErrorReader, Maximums};

0 commit comments

Comments
 (0)