Skip to content

Commit 817f87a

Browse files
committed
Fix clippy warnings
1 parent 7256d79 commit 817f87a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cargo-registry-markdown/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ pub fn text_to_html(
267267
}
268268
}
269269

270-
encode_minimal(text).replace("\n", "<br>\n")
270+
encode_minimal(text).replace('\n', "<br>\n")
271271
}
272272

273273
/// Helper function to build a new `HashSet` from the items slice.

src/tests/record.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ async fn record_http(req: Request<Body>, client: Client) -> Result<ResponseAndEx
247247
.iter()
248248
.map(|h| (h.0.as_str().to_string(), h.1.to_str().unwrap().to_string()))
249249
.collect(),
250-
body: base64::encode(&body.to_vec()),
250+
body: base64::encode(&body),
251251
};
252252

253253
// Construct an outgoing request
@@ -273,7 +273,7 @@ async fn record_http(req: Request<Body>, client: Client) -> Result<ResponseAndEx
273273
.iter()
274274
.map(|h| (h.0.as_str().to_string(), h.1.to_str().unwrap().to_string()))
275275
.collect(),
276-
body: base64::encode(&body.to_vec()),
276+
body: base64::encode(&body),
277277
};
278278

279279
// Construct an outgoing response
@@ -371,7 +371,7 @@ impl GhUser {
371371
return;
372372
}
373373

374-
let password = crate::env(&format!("GH_PASS_{}", self.login.replace("-", "_")));
374+
let password = crate::env(&format!("GH_PASS_{}", self.login.replace('-', "_")));
375375
#[derive(Serialize)]
376376
struct Authorization {
377377
scopes: Vec<String>,

0 commit comments

Comments
 (0)