summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Platte <jplatte+git@posteo.de>2024-09-25 07:44:47 +0000
committerGitHub <noreply@github.com>2024-09-25 03:44:47 -0400
commit2fb6cea732461c8f25b025fa37ac8d3375235a7b (patch)
treef5c8e9bf3c990606597e7f8703d230ac514f72b6
parent391f2deccd6a77139bd6dcaa8579cdbce9d2184a (diff)
Remove unused dependencies from examples (#2934)
-rw-r--r--axum-core/Cargo.toml3
-rw-r--r--examples/chat/Cargo.toml1
-rw-r--r--examples/compression/Cargo.toml1
-rw-r--r--examples/consume-body-in-extractor-or-middleware/Cargo.toml3
-rw-r--r--examples/customize-path-rejection/Cargo.toml1
-rw-r--r--examples/diesel-async-postgres/Cargo.toml1
-rw-r--r--examples/diesel-postgres/Cargo.toml1
-rw-r--r--examples/global-404-handler/Cargo.toml1
-rw-r--r--examples/graceful-shutdown/Cargo.toml4
-rw-r--r--examples/key-value-store/Cargo.toml1
-rw-r--r--examples/low-level-rustls/Cargo.toml1
-rw-r--r--examples/print-request-response/Cargo.toml2
-rw-r--r--examples/query-params-with-empty-strings/Cargo.toml1
-rw-r--r--examples/readme/Cargo.toml1
-rw-r--r--examples/rest-grpc-multiplex/Cargo.toml12
-rw-r--r--examples/simple-router-wasm/Cargo.toml3
-rw-r--r--examples/static-file-server/Cargo.toml1
-rw-r--r--examples/testing-websockets/Cargo.toml1
-rw-r--r--examples/testing/Cargo.toml1
-rw-r--r--examples/tls-graceful-shutdown/Cargo.toml1
-rw-r--r--examples/unix-domain-socket/Cargo.toml1
-rw-r--r--examples/validator/Cargo.toml1
-rw-r--r--examples/websockets/Cargo.toml1
23 files changed, 12 insertions, 32 deletions
diff --git a/axum-core/Cargo.toml b/axum-core/Cargo.toml
index 2d4d0759..afb2fbf0 100644
--- a/axum-core/Cargo.toml
+++ b/axum-core/Cargo.toml
@@ -55,6 +55,9 @@ allowed = [
"http_body",
]
+[package.metadata.cargo-machete]
+ignored = ["tower-http"] # See __private_docs feature
+
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
diff --git a/examples/chat/Cargo.toml b/examples/chat/Cargo.toml
index 90d88246..2beb99cf 100644
--- a/examples/chat/Cargo.toml
+++ b/examples/chat/Cargo.toml
@@ -8,6 +8,5 @@ publish = false
axum = { path = "../../axum", features = ["ws"] }
futures = "0.3"
tokio = { version = "1", features = ["full"] }
-tower = { version = "0.4", features = ["util"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
diff --git a/examples/compression/Cargo.toml b/examples/compression/Cargo.toml
index d5fdcf8e..f6aa4427 100644
--- a/examples/compression/Cargo.toml
+++ b/examples/compression/Cargo.toml
@@ -6,7 +6,6 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
-axum-extra = { path = "../../axum-extra", features = ["typed-header"] }
serde_json = "1"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
tower = "0.4"
diff --git a/examples/consume-body-in-extractor-or-middleware/Cargo.toml b/examples/consume-body-in-extractor-or-middleware/Cargo.toml
index 9aeb864d..66885885 100644
--- a/examples/consume-body-in-extractor-or-middleware/Cargo.toml
+++ b/examples/consume-body-in-extractor-or-middleware/Cargo.toml
@@ -7,9 +7,6 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
http-body-util = "0.1.0"
-hyper = "1.0.0"
tokio = { version = "1.0", features = ["full"] }
-tower = "0.4"
-tower-http = { version = "0.5.0", features = ["map-request-body", "util"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
diff --git a/examples/customize-path-rejection/Cargo.toml b/examples/customize-path-rejection/Cargo.toml
index 8f5b1e44..c1c4884d 100644
--- a/examples/customize-path-rejection/Cargo.toml
+++ b/examples/customize-path-rejection/Cargo.toml
@@ -7,7 +7,6 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
serde = { version = "1.0", features = ["derive"] }
-serde_json = "1.0"
tokio = { version = "1.0", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
diff --git a/examples/diesel-async-postgres/Cargo.toml b/examples/diesel-async-postgres/Cargo.toml
index d86db151..a79a2521 100644
--- a/examples/diesel-async-postgres/Cargo.toml
+++ b/examples/diesel-async-postgres/Cargo.toml
@@ -10,7 +10,6 @@ bb8 = "0.8"
diesel = "2"
diesel-async = { version = "0.3", features = ["postgres", "bb8"] }
serde = { version = "1.0", features = ["derive"] }
-serde_json = "1"
tokio = { version = "1.0", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
diff --git a/examples/diesel-postgres/Cargo.toml b/examples/diesel-postgres/Cargo.toml
index ff42a0db..e7566522 100644
--- a/examples/diesel-postgres/Cargo.toml
+++ b/examples/diesel-postgres/Cargo.toml
@@ -10,7 +10,6 @@ deadpool-diesel = { version = "0.4.1", features = ["postgres"] }
diesel = { version = "2", features = ["postgres"] }
diesel_migrations = "2"
serde = { version = "1.0", features = ["derive"] }
-serde_json = "1"
tokio = { version = "1.0", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
diff --git a/examples/global-404-handler/Cargo.toml b/examples/global-404-handler/Cargo.toml
index 9848d9e8..a453cab5 100644
--- a/examples/global-404-handler/Cargo.toml
+++ b/examples/global-404-handler/Cargo.toml
@@ -7,6 +7,5 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
tokio = { version = "1.0", features = ["full"] }
-tower = { version = "0.4", features = ["util"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
diff --git a/examples/graceful-shutdown/Cargo.toml b/examples/graceful-shutdown/Cargo.toml
index 86dfd527..69688ac9 100644
--- a/examples/graceful-shutdown/Cargo.toml
+++ b/examples/graceful-shutdown/Cargo.toml
@@ -6,10 +6,6 @@ publish = false
[dependencies]
axum = { path = "../../axum", features = ["tracing"] }
-hyper = { version = "1.0", features = [] }
-hyper-util = { version = "0.1", features = ["tokio", "server-auto", "http1"] }
tokio = { version = "1.0", features = ["full"] }
-tower = { version = "0.4", features = ["util"] }
tower-http = { version = "0.5", features = ["timeout", "trace"] }
-tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
diff --git a/examples/key-value-store/Cargo.toml b/examples/key-value-store/Cargo.toml
index c23b28d2..60277fee 100644
--- a/examples/key-value-store/Cargo.toml
+++ b/examples/key-value-store/Cargo.toml
@@ -15,6 +15,5 @@ tower-http = { version = "0.5.0", features = [
"limit",
"trace",
] }
-tower-layer = "0.3.2"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
diff --git a/examples/low-level-rustls/Cargo.toml b/examples/low-level-rustls/Cargo.toml
index 3975fcb9..1eaf04b3 100644
--- a/examples/low-level-rustls/Cargo.toml
+++ b/examples/low-level-rustls/Cargo.toml
@@ -12,7 +12,6 @@ hyper-util = { version = "0.1" }
rustls-pemfile = "1.0.4"
tokio = { version = "1", features = ["full"] }
tokio-rustls = "0.24.1"
-tower = { version = "0.4", features = ["make"] }
tower-service = "0.3.2"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
diff --git a/examples/print-request-response/Cargo.toml b/examples/print-request-response/Cargo.toml
index a314b5b7..d6e064bb 100644
--- a/examples/print-request-response/Cargo.toml
+++ b/examples/print-request-response/Cargo.toml
@@ -7,8 +7,6 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
http-body-util = "0.1.0"
-hyper = { version = "1.0.0", features = ["full"] }
tokio = { version = "1.0", features = ["full"] }
-tower = { version = "0.4", features = ["util", "filter"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
diff --git a/examples/query-params-with-empty-strings/Cargo.toml b/examples/query-params-with-empty-strings/Cargo.toml
index 7a52e98d..8cc8f1f5 100644
--- a/examples/query-params-with-empty-strings/Cargo.toml
+++ b/examples/query-params-with-empty-strings/Cargo.toml
@@ -7,7 +7,6 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
http-body-util = "0.1.0"
-hyper = "1.0.0"
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
diff --git a/examples/readme/Cargo.toml b/examples/readme/Cargo.toml
index 4a79c9bb..17669567 100644
--- a/examples/readme/Cargo.toml
+++ b/examples/readme/Cargo.toml
@@ -7,7 +7,6 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
serde = { version = "1.0", features = ["derive"] }
-serde_json = "1.0.68"
tokio = { version = "1.0", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
diff --git a/examples/rest-grpc-multiplex/Cargo.toml b/examples/rest-grpc-multiplex/Cargo.toml
index 11a6a3a2..e12f8e49 100644
--- a/examples/rest-grpc-multiplex/Cargo.toml
+++ b/examples/rest-grpc-multiplex/Cargo.toml
@@ -8,13 +8,13 @@ publish = false
axum = { path = "../../axum" }
futures = "0.3"
hyper = { version = "1.0.0", features = ["full"] }
-prost = "0.11"
-tokio = { version = "1", features = ["full"] }
-tonic = { version = "0.9" }
-tonic-reflection = "0.9"
+#prost = "0.11"
+#tokio = { version = "1", features = ["full"] }
+#tonic = { version = "0.9" }
+#tonic-reflection = "0.9"
tower = { version = "0.4", features = ["full"] }
-tracing = "0.1"
-tracing-subscriber = { version = "0.3", features = ["env-filter"] }
+#tracing = "0.1"
+#tracing-subscriber = { version = "0.3", features = ["env-filter"] }
[build-dependencies]
tonic-build = { version = "0.9", features = ["prost"] }
diff --git a/examples/simple-router-wasm/Cargo.toml b/examples/simple-router-wasm/Cargo.toml
index c3041e4a..d250cc23 100644
--- a/examples/simple-router-wasm/Cargo.toml
+++ b/examples/simple-router-wasm/Cargo.toml
@@ -14,3 +14,6 @@ axum-extra = { path = "../../axum-extra", default-features = false }
futures-executor = "0.3.21"
http = "1.0.0"
tower-service = "0.3.1"
+
+[package.metadata.cargo-machete]
+ignored = ["axum-extra"]
diff --git a/examples/static-file-server/Cargo.toml b/examples/static-file-server/Cargo.toml
index 3f41d608..26143acf 100644
--- a/examples/static-file-server/Cargo.toml
+++ b/examples/static-file-server/Cargo.toml
@@ -6,7 +6,6 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
-axum-extra = { path = "../../axum-extra" }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
tower-http = { version = "0.5.0", features = ["fs", "trace"] }
diff --git a/examples/testing-websockets/Cargo.toml b/examples/testing-websockets/Cargo.toml
index afe7b184..0a64468e 100644
--- a/examples/testing-websockets/Cargo.toml
+++ b/examples/testing-websockets/Cargo.toml
@@ -7,6 +7,5 @@ publish = false
[dependencies]
axum = { path = "../../axum", features = ["ws"] }
futures = "0.3"
-hyper = { version = "1.0.0", features = ["full"] }
tokio = { version = "1.0", features = ["full"] }
tokio-tungstenite = "0.23"
diff --git a/examples/testing/Cargo.toml b/examples/testing/Cargo.toml
index 00e8132f..946d923c 100644
--- a/examples/testing/Cargo.toml
+++ b/examples/testing/Cargo.toml
@@ -7,7 +7,6 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
http-body-util = "0.1.0"
-hyper = { version = "1.0.0", features = ["full"] }
hyper-util = { version = "0.1", features = ["client", "http1", "client-legacy"] }
mime = "0.3"
serde_json = "1.0"
diff --git a/examples/tls-graceful-shutdown/Cargo.toml b/examples/tls-graceful-shutdown/Cargo.toml
index 40e48903..18338d38 100644
--- a/examples/tls-graceful-shutdown/Cargo.toml
+++ b/examples/tls-graceful-shutdown/Cargo.toml
@@ -7,7 +7,6 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
axum-server = { version = "0.6", features = ["tls-rustls"] }
-hyper = { version = "0.14", features = ["full"] }
tokio = { version = "1", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
diff --git a/examples/unix-domain-socket/Cargo.toml b/examples/unix-domain-socket/Cargo.toml
index 7f157c7d..856080ee 100644
--- a/examples/unix-domain-socket/Cargo.toml
+++ b/examples/unix-domain-socket/Cargo.toml
@@ -11,5 +11,4 @@ hyper = { version = "1.0.0", features = ["full"] }
hyper-util = { version = "0.1", features = ["tokio", "server-auto", "http1"] }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
-tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
diff --git a/examples/validator/Cargo.toml b/examples/validator/Cargo.toml
index a1adc075..70216bad 100644
--- a/examples/validator/Cargo.toml
+++ b/examples/validator/Cargo.toml
@@ -7,7 +7,6 @@ version = "0.1.0"
[dependencies]
async-trait = "0.1.67"
axum = { path = "../../axum" }
-http-body = "1.0.0"
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0.29"
tokio = { version = "1.0", features = ["full"] }
diff --git a/examples/websockets/Cargo.toml b/examples/websockets/Cargo.toml
index 842a09a3..edcc45e2 100644
--- a/examples/websockets/Cargo.toml
+++ b/examples/websockets/Cargo.toml
@@ -12,7 +12,6 @@ futures-util = { version = "0.3", default-features = false, features = ["sink",
headers = "0.4"
tokio = { version = "1.0", features = ["full"] }
tokio-tungstenite = "0.23"
-tower = { version = "0.4", features = ["util"] }
tower-http = { version = "0.5.0", features = ["fs", "trace"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }