Skip to content

Commit 0d5ed7a

Browse files
committed
Make clippy happy
1 parent 7920080 commit 0d5ed7a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/bin/render-readmes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ fn main() {
146146
config
147147
.uploader
148148
.upload(
149-
reqwest::Client::new(),
149+
&reqwest::Client::new(),
150150
&readme_path,
151151
readme.into_bytes(),
152152
"text/html",

src/github.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ where
2929
format!("token {}", auth.access_token),
3030
).send()?
3131
.error_for_status()
32-
.map_err(handle_error_response)?
32+
.map_err(|e| handle_error_response(&e))?
3333
.json()
3434
.map_err(Into::into)
3535
}
3636

37-
fn handle_error_response(error: reqwest::Error) -> Box<dyn CargoError> {
37+
fn handle_error_response(error: &reqwest::Error) -> Box<dyn CargoError> {
3838
use reqwest::StatusCode as Status;
3939

4040
match error.status() {

src/uploaders.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl Uploader {
107107
/// and its checksum.
108108
pub fn upload(
109109
&self,
110-
client: reqwest::Client,
110+
client: &reqwest::Client,
111111
path: &str,
112112
body: Vec<u8>,
113113
content_type: &str,
@@ -148,7 +148,7 @@ impl Uploader {
148148
let mut body = Vec::new();
149149
LimitErrorReader::new(req.body(), maximums.max_upload_size).read_to_end(&mut body)?;
150150
verify_tarball(krate, vers, &body, maximums.max_unpack_size)?;
151-
self.upload(app.http_client()?, &path, body, "application/x-tar")?
151+
self.upload(&app.http_client()?, &path, body, "application/x-tar")?
152152
};
153153
// We create the bomb for the crate file before uploading the readme so that if the
154154
// readme upload fails, the uploaded crate file is automatically deleted.
@@ -159,7 +159,7 @@ impl Uploader {
159159
let (readme_path, _) = if let Some(rendered) = readme {
160160
let path = Uploader::readme_path(&krate.name, &vers.to_string());
161161
self.upload(
162-
app.http_client()?,
162+
&app.http_client()?,
163163
&path,
164164
rendered.into_bytes(),
165165
"text/html",

0 commit comments

Comments
 (0)