Skip to content

Commit 8806d80

Browse files
committed
Fix clippy lint
1 parent 4579144 commit 8806d80

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

axum-extra/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ allowed = [
2929
"http_body",
3030
"pin_project_lite",
3131
"prost",
32-
"serde",
32+
"serde_core",
3333
"tokio",
3434
"tokio_util",
3535
"tower_layer",

axum/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ allowed = [
3333
"bytes",
3434
"http",
3535
"http_body",
36-
"serde",
36+
"serde_core",
3737
"tokio",
3838
# for the `__private` feature
3939
"reqwest",
@@ -78,6 +78,7 @@ __private_docs = [
7878
"axum-core/__private_docs",
7979
# Enables upstream things linked to in docs
8080
"tower/full",
81+
"dep:serde",
8182
"dep:tower-http",
8283
]
8384

@@ -122,6 +123,9 @@ tokio = { package = "tokio", version = "1.44", features = ["time"], optional = t
122123
tokio-tungstenite = { version = "0.27.0", optional = true }
123124
tracing = { version = "0.1", default-features = false, optional = true }
124125

126+
# doc dependencies
127+
serde = { version = "1.0.211", optional = true }
128+
125129
[dependencies.tower-http]
126130
version = "0.6.0"
127131
optional = true

axum/src/extract/path/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ mod tests {
710710
async fn captures_match_empty_inner_segments() {
711711
let app = Router::new().route(
712712
"/{key}/method",
713-
get(|Path(param): Path<String>| async move { param.to_string() }),
713+
get(|Path(param): Path<String>| async move { param.clone() }),
714714
);
715715

716716
let client = TestClient::new(app);
@@ -726,7 +726,7 @@ mod tests {
726726
async fn captures_match_empty_inner_segments_near_end() {
727727
let app = Router::new().route(
728728
"/method/{key}/",
729-
get(|Path(param): Path<String>| async move { param.to_string() }),
729+
get(|Path(param): Path<String>| async move { param.clone() }),
730730
);
731731

732732
let client = TestClient::new(app);
@@ -745,7 +745,7 @@ mod tests {
745745
async fn captures_match_empty_trailing_segment() {
746746
let app = Router::new().route(
747747
"/method/{key}",
748-
get(|Path(param): Path<String>| async move { param.to_string() }),
748+
get(|Path(param): Path<String>| async move { param.clone() }),
749749
);
750750

751751
let client = TestClient::new(app);

0 commit comments

Comments
 (0)