Skip to content

Commit ac5d645

Browse files
noxjbr
authored andcommitted
Fix clippy lints
1 parent 1fe07df commit ac5d645

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/headers/header_name.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl PartialEq<String> for HeaderName {
129129
}
130130
}
131131

132-
impl<'a> PartialEq<&String> for HeaderName {
132+
impl PartialEq<&String> for HeaderName {
133133
fn eq(&self, other: &&String) -> bool {
134134
match HeaderName::from_str(other) {
135135
Err(_) => false,

src/headers/header_value.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl PartialEq<String> for HeaderValue {
125125
}
126126
}
127127

128-
impl<'a> PartialEq<&String> for HeaderValue {
128+
impl PartialEq<&String> for HeaderValue {
129129
fn eq(&self, other: &&String) -> bool {
130130
&&self.inner == other
131131
}

src/headers/header_values.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ impl PartialEq<String> for HeaderValues {
123123
}
124124
}
125125

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

src/status.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,14 @@ mod test {
172172

173173
#[test]
174174
fn construct_shorthand_with_valid_status_code() {
175-
let _res = Some(()).status(200).unwrap();
175+
Some(()).status(200).unwrap();
176176
}
177177

178178
#[test]
179179
#[should_panic(expected = "Could not convert into a valid `StatusCode`")]
180180
fn construct_shorthand_with_invalid_status_code() {
181181
let res: Result<(), std::io::Error> =
182182
Err(std::io::Error::new(std::io::ErrorKind::Other, "oh no!"));
183-
let _res = res.status(600).unwrap();
183+
res.status(600).unwrap();
184184
}
185185
}

src/status_code.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ mod test {
725725
assert_eq!(StatusCode::Accepted, status_code);
726726
assert_eq!(
727727
Some(202),
728-
serde_json::to_value(&StatusCode::Accepted)?.as_u64()
728+
serde_json::to_value(StatusCode::Accepted)?.as_u64()
729729
);
730730
Ok(())
731731
}

0 commit comments

Comments
 (0)