mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-14 00:00:15 +02:00
Fix lint warnings (#1267)
This commit is contained in:
@@ -80,7 +80,7 @@ where
|
||||
E: Clone,
|
||||
{
|
||||
fn clone(&self) -> Self {
|
||||
Self(self.0.clone(), self.1.clone())
|
||||
Self(self.0.clone(), self.1)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user