Fix clippy lints

This commit is contained in:
Anthony Ramine 2022-10-16 11:38:05 +02:00 committed by Jacob Rothstein
parent 1fe07df286
commit ac5d645ce5
5 changed files with 6 additions and 6 deletions

View File

@ -129,7 +129,7 @@ impl PartialEq<String> for HeaderName {
}
}
impl<'a> PartialEq<&String> for HeaderName {
impl PartialEq<&String> for HeaderName {
fn eq(&self, other: &&String) -> bool {
match HeaderName::from_str(other) {
Err(_) => false,

View File

@ -125,7 +125,7 @@ impl PartialEq<String> for HeaderValue {
}
}
impl<'a> PartialEq<&String> for HeaderValue {
impl PartialEq<&String> for HeaderValue {
fn eq(&self, other: &&String) -> bool {
&&self.inner == other
}

View File

@ -123,7 +123,7 @@ impl PartialEq<String> for HeaderValues {
}
}
impl<'a> PartialEq<&String> for HeaderValues {
impl PartialEq<&String> for HeaderValues {
fn eq(&self, other: &&String) -> bool {
self.inner.len() == 1 && self.inner[0] == **other
}

View File

@ -172,7 +172,7 @@ mod test {
#[test]
fn construct_shorthand_with_valid_status_code() {
let _res = Some(()).status(200).unwrap();
Some(()).status(200).unwrap();
}
#[test]
@ -180,6 +180,6 @@ mod test {
fn construct_shorthand_with_invalid_status_code() {
let res: Result<(), std::io::Error> =
Err(std::io::Error::new(std::io::ErrorKind::Other, "oh no!"));
let _res = res.status(600).unwrap();
res.status(600).unwrap();
}
}

View File

@ -725,7 +725,7 @@ mod test {
assert_eq!(StatusCode::Accepted, status_code);
assert_eq!(
Some(202),
serde_json::to_value(&StatusCode::Accepted)?.as_u64()
serde_json::to_value(StatusCode::Accepted)?.as_u64()
);
Ok(())
}