tor-dirclient: Fix clippy lints.

This commit is contained in:
Gabriela Moldovan 2023-08-16 15:46:14 +01:00
parent c3ea366539
commit 310b4bf35e
No known key found for this signature in database
GPG Key ID: 3946E0ADE72BAC99
1 changed files with 5 additions and 5 deletions

View File

@ -48,21 +48,21 @@ mod test {
#[test]
fn format() {
fn chk_format(body: String) {
let req = build_request(body.clone(), &[]);
fn chk_format(body: &str) {
let req = build_request(body.to_string(), &[]);
assert_eq!(
encode_request(&req),
format!("GET /index.html HTTP/1.0\r\n\r\n{body}")
);
let req = build_request(body.clone(), &[("X-Marsupial", "Opossum")]);
let req = build_request(body.to_string(), &[("X-Marsupial", "Opossum")]);
assert_eq!(
encode_request(&req),
format!("GET /index.html HTTP/1.0\r\nx-marsupial: Opossum\r\n\r\n{body}")
);
}
chk_format(Default::default());
chk_format("hello".into());
chk_format("");
chk_format("hello");
}
}