Fix lint warnings (#1267)

This commit is contained in:
David Pedersen
2022-08-17 09:41:52 +00:00
committed by GitHub
parent f2243c4db0
commit 90dbd52ee4
4 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ where
E: Clone,
{
fn clone(&self) -> Self {
Self(self.0.clone(), self.1.clone())
Self(self.0.clone(), self.1)
}
}
+3 -3
View File
@@ -236,7 +236,7 @@ mod tests {
);
let input = Input {
foo: "bar".to_string(),
foo: "bar".to_owned(),
};
let client = TestClient::new(app);
@@ -264,7 +264,7 @@ mod tests {
let app = Router::new().route("/", post(|_: ProtoBuf<Expected>| async {}));
let input = Input {
foo: "bar".to_string(),
foo: "bar".to_owned(),
};
let client = TestClient::new(app);
@@ -299,7 +299,7 @@ mod tests {
);
let input = Input {
foo: "bar".to_string(),
foo: "bar".to_owned(),
};
let client = TestClient::new(app);
+2 -2
View File
@@ -187,7 +187,7 @@ where
}
};
T::deserialize(de::PathDeserializer::new(&*params))
T::deserialize(de::PathDeserializer::new(params))
.map_err(|err| {
PathRejection::FailedToDeserializePathParams(FailedToDeserializePathParams(err))
})
@@ -260,7 +260,7 @@ impl std::error::Error for PathDeserializationError {}
///
/// This type is obtained through [`FailedToDeserializePathParams::into_kind`] and is useful for building
/// more precise error messages.
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
#[non_exhaustive]
pub enum ErrorKind {
/// The URI contained the wrong number of parameters.
-1
View File
@@ -247,7 +247,6 @@ mod tests {
let res = client.post("/").body(r#"{ "foo": "bar" }"#).send().await;
let status = res.status();
dbg!(res.text().await);
assert_eq!(status, StatusCode::UNSUPPORTED_MEDIA_TYPE);
}