From 2ece131b366319122afd9204c3bc289be8c3102d Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Tue, 18 Jul 2023 17:42:33 +0100 Subject: [PATCH] remove unneeded dependencies --- Cargo.lock | 32 ------------------- auth/cookie-auth/Cargo.toml | 2 -- basics/nested-routing/Cargo.toml | 1 - basics/todo/Cargo.toml | 2 -- cors/backend/Cargo.toml | 1 - databases/diesel/Cargo.toml | 1 - databases/mysql/Cargo.toml | 1 - databases/redis/Cargo.toml | 1 - databases/sqlite/Cargo.toml | 1 - forms/multipart-s3/Cargo.toml | 1 - graphql/async-graphql/Cargo.toml | 1 - graphql/juniper-advanced/Cargo.toml | 2 -- graphql/juniper/Cargo.toml | 2 -- https-tls/rustls/Cargo.toml | 1 - json/json/Cargo.toml | 1 - .../middleware-encrypted-payloads/Cargo.toml | 2 -- .../middleware-http-to-https/Cargo.toml | 2 -- protobuf/Cargo.toml | 3 +- protobuf/src/main.rs | 2 +- server-sent-events/Cargo.toml | 2 -- shutdown-server/Cargo.toml | 1 - templating/yarte/Cargo.toml | 5 +++ websockets/chat-actorless/Cargo.toml | 2 -- websockets/chat-tcp/Cargo.toml | 1 - websockets/chat/Cargo.toml | 2 -- websockets/echo-actorless/Cargo.toml | 1 - websockets/echo/Cargo.toml | 1 - 27 files changed, 7 insertions(+), 67 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b833f8c..36c2c58 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -990,7 +990,6 @@ dependencies = [ name = "async-graphql-demo" version = "1.0.0" dependencies = [ - "actix", "actix-cors", "actix-web", "actix-web-lab", @@ -2229,10 +2228,8 @@ dependencies = [ "actix-identity", "actix-session", "actix-web", - "actix-web-lab", "env_logger", "log", - "rand 0.8.5", ] [[package]] @@ -2286,7 +2283,6 @@ dependencies = [ "env_logger", "log", "serde", - "serde_json", ] [[package]] @@ -2621,7 +2617,6 @@ version = "1.0.0" dependencies = [ "actix-web", "env_logger", - "futures-util", "log", "redis", "serde", @@ -2639,7 +2634,6 @@ dependencies = [ "r2d2_sqlite", "rusqlite", "serde", - "serde_json", ] [[package]] @@ -2779,7 +2773,6 @@ dependencies = [ "env_logger", "log", "serde", - "serde_json", "uuid 1.4.1", ] @@ -4122,7 +4115,6 @@ version = "1.0.0" dependencies = [ "actix-web", "env_logger", - "futures-util", "log", "serde", "serde_json", @@ -4223,8 +4215,6 @@ dependencies = [ "mysql 24.0.0", "r2d2", "r2d2_mysql", - "serde", - "serde_json", "uuid 1.4.1", ] @@ -4238,8 +4228,6 @@ dependencies = [ "env_logger", "juniper", "log", - "serde", - "serde_json", ] [[package]] @@ -4594,9 +4582,7 @@ dependencies = [ "aes-gcm-siv", "base64 0.21.2", "env_logger", - "futures-util", "log", - "pin-project", "serde", "serde_json", ] @@ -4628,7 +4614,6 @@ name = "middleware-http-to-https" version = "1.0.0" dependencies = [ "actix-web", - "actix-web-lab", "env_logger", "futures-util", "log", @@ -4842,7 +4827,6 @@ dependencies = [ "env_logger", "futures-util", "log", - "sanitize-filename", "serde", "serde_json", "tokio 1.29.1", @@ -4853,7 +4837,6 @@ name = "mysql" version = "1.0.0" dependencies = [ "actix-web", - "chrono", "derive_more", "dotenv", "env_logger", @@ -4979,7 +4962,6 @@ dependencies = [ "env_logger", "log", "serde", - "serde_json", ] [[package]] @@ -5685,7 +5667,6 @@ dependencies = [ "env_logger", "log", "prost", - "prost-derive", ] [[package]] @@ -6352,7 +6333,6 @@ version = "1.0.0" dependencies = [ "actix-files", "actix-web", - "actix-web-lab", "env_logger", "log", "rustls 0.20.8", @@ -6687,8 +6667,6 @@ dependencies = [ "futures-util", "log", "parking_lot 0.12.1", - "tokio 1.29.1", - "tokio-stream", ] [[package]] @@ -6754,7 +6732,6 @@ dependencies = [ "env_logger", "log", "parking_lot 0.12.1", - "tokio 1.29.1", ] [[package]] @@ -7750,12 +7727,10 @@ dependencies = [ "actix-files", "actix-session", "actix-web", - "actix-web-lab", "dotenv", "env_logger", "log", "serde", - "serde_json", "sqlx 0.7.1", "tera", ] @@ -8863,7 +8838,6 @@ name = "websocket" version = "1.0.0" dependencies = [ "actix", - "actix-codec", "actix-files", "actix-web", "actix-web-actors", @@ -8893,8 +8867,6 @@ dependencies = [ "actix-files", "actix-web", "actix-ws", - "awc", - "derive_more", "env_logger", "futures-util", "log", @@ -8923,7 +8895,6 @@ dependencies = [ "actix-files", "actix-web", "actix-ws", - "awc", "env_logger", "futures-util", "log", @@ -8941,8 +8912,6 @@ dependencies = [ "env_logger", "log", "rand 0.8.5", - "serde", - "serde_json", ] [[package]] @@ -8955,7 +8924,6 @@ dependencies = [ "actix-web", "actix-web-actors", "byteorder", - "bytes 1.4.0", "env_logger", "futures-util", "log", diff --git a/auth/cookie-auth/Cargo.toml b/auth/cookie-auth/Cargo.toml index b5c386c..fcf2011 100644 --- a/auth/cookie-auth/Cargo.toml +++ b/auth/cookie-auth/Cargo.toml @@ -5,10 +5,8 @@ edition = "2021" [dependencies] actix-web.workspace = true -actix-web-lab.workspace = true actix-identity.workspace = true actix-session = { workspace = true, features = ["cookie-session"] } env_logger.workspace = true log.workspace = true -rand.workspace = true diff --git a/basics/nested-routing/Cargo.toml b/basics/nested-routing/Cargo.toml index 4148f34..d9b3620 100644 --- a/basics/nested-routing/Cargo.toml +++ b/basics/nested-routing/Cargo.toml @@ -8,4 +8,3 @@ actix-web.workspace = true env_logger.workspace = true log.workspace = true serde.workspace = true -serde_json.workspace = true diff --git a/basics/todo/Cargo.toml b/basics/todo/Cargo.toml index f187b23..2e2a0aa 100644 --- a/basics/todo/Cargo.toml +++ b/basics/todo/Cargo.toml @@ -7,12 +7,10 @@ edition = "2021" actix-files.workspace = true actix-session = { workspace = true, features = ["cookie-session"] } actix-web.workspace = true -actix-web-lab.workspace = true dotenv = "0.15" env_logger.workspace = true log.workspace = true serde.workspace = true -serde_json.workspace = true sqlx = { version = "0.7", features = ["runtime-tokio-rustls", "sqlite"] } tera = "1.5" diff --git a/cors/backend/Cargo.toml b/cors/backend/Cargo.toml index f4a9349..c4f9773 100644 --- a/cors/backend/Cargo.toml +++ b/cors/backend/Cargo.toml @@ -10,4 +10,3 @@ actix-cors.workspace = true env_logger.workspace = true log.workspace = true serde.workspace = true -serde_json.workspace = true diff --git a/databases/diesel/Cargo.toml b/databases/diesel/Cargo.toml index d66eddd..8ebe1e7 100644 --- a/databases/diesel/Cargo.toml +++ b/databases/diesel/Cargo.toml @@ -10,5 +10,4 @@ dotenv = "0.15" env_logger.workspace = true log.workspace = true serde = { version = "1.0", features = ["derive"] } -serde_json.workspace = true uuid = { version = "1", features = ["v4", "serde"] } diff --git a/databases/mysql/Cargo.toml b/databases/mysql/Cargo.toml index dbf47c0..94e578c 100644 --- a/databases/mysql/Cargo.toml +++ b/databases/mysql/Cargo.toml @@ -5,7 +5,6 @@ edition = "2021" [dependencies] actix-web.workspace = true -chrono.workspace = true derive_more.workspace = true dotenv = "0.15" env_logger.workspace = true diff --git a/databases/redis/Cargo.toml b/databases/redis/Cargo.toml index 696bd14..9347c60 100644 --- a/databases/redis/Cargo.toml +++ b/databases/redis/Cargo.toml @@ -7,7 +7,6 @@ edition = "2021" actix-web.workspace = true env_logger.workspace = true -futures-util.workspace = true log.workspace = true redis = { version = "0.23", default-features = false, features = ["tokio-comp", "connection-manager"] } serde.workspace = true diff --git a/databases/sqlite/Cargo.toml b/databases/sqlite/Cargo.toml index 8d31c90..a3bf530 100644 --- a/databases/sqlite/Cargo.toml +++ b/databases/sqlite/Cargo.toml @@ -13,4 +13,3 @@ r2d2 = "0.8" r2d2_sqlite = "0.22" rusqlite = "0.29" serde.workspace = true -serde_json.workspace = true diff --git a/forms/multipart-s3/Cargo.toml b/forms/multipart-s3/Cargo.toml index 35c8598..357503f 100644 --- a/forms/multipart-s3/Cargo.toml +++ b/forms/multipart-s3/Cargo.toml @@ -15,7 +15,6 @@ dotenv = "0.15" env_logger.workspace = true futures-util.workspace = true log.workspace = true -sanitize-filename = "0.4" serde.workspace = true serde_json.workspace = true tokio = { workspace = true, features = ["io-util", "fs"] } diff --git a/graphql/async-graphql/Cargo.toml b/graphql/async-graphql/Cargo.toml index 81cd089..a434c7b 100644 --- a/graphql/async-graphql/Cargo.toml +++ b/graphql/async-graphql/Cargo.toml @@ -4,7 +4,6 @@ version = "1.0.0" edition = "2021" [dependencies] -actix.workspace = true actix-web.workspace = true actix-web-lab.workspace = true actix-cors.workspace = true diff --git a/graphql/juniper-advanced/Cargo.toml b/graphql/juniper-advanced/Cargo.toml index 35e482b..3054236 100644 --- a/graphql/juniper-advanced/Cargo.toml +++ b/graphql/juniper-advanced/Cargo.toml @@ -17,6 +17,4 @@ r2d2_mysql = "24" dotenv = "0.15" env_logger.workspace = true log.workspace = true -serde.workspace = true -serde_json.workspace = true uuid = { version = "1", features = ["v4", "serde"] } diff --git a/graphql/juniper/Cargo.toml b/graphql/juniper/Cargo.toml index 12780ce..ad9d825 100644 --- a/graphql/juniper/Cargo.toml +++ b/graphql/juniper/Cargo.toml @@ -12,5 +12,3 @@ juniper = "0.15.10" env_logger.workspace = true log.workspace = true -serde.workspace = true -serde_json.workspace = true diff --git a/https-tls/rustls/Cargo.toml b/https-tls/rustls/Cargo.toml index 01b9a86..f1ca414 100644 --- a/https-tls/rustls/Cargo.toml +++ b/https-tls/rustls/Cargo.toml @@ -9,7 +9,6 @@ path = "src/main.rs" [dependencies] actix-web = { workspace = true, features = ["rustls"] } -actix-web-lab.workspace = true actix-files.workspace = true env_logger.workspace = true diff --git a/json/json/Cargo.toml b/json/json/Cargo.toml index d7a9950..0b427b7 100644 --- a/json/json/Cargo.toml +++ b/json/json/Cargo.toml @@ -6,7 +6,6 @@ edition = "2021" [dependencies] actix-web.workspace = true env_logger.workspace = true -futures-util.workspace = true log.workspace = true serde = { version = "1.0", features = ["derive"] } serde_json.workspace = true diff --git a/middleware/middleware-encrypted-payloads/Cargo.toml b/middleware/middleware-encrypted-payloads/Cargo.toml index 3312440..258d401 100644 --- a/middleware/middleware-encrypted-payloads/Cargo.toml +++ b/middleware/middleware-encrypted-payloads/Cargo.toml @@ -11,8 +11,6 @@ actix-web-lab.workspace = true aes-gcm-siv = "0.11" base64 = "0.21" env_logger.workspace = true -futures-util.workspace = true log.workspace = true -pin-project = "1" serde.workspace = true serde_json.workspace = true diff --git a/middleware/middleware-http-to-https/Cargo.toml b/middleware/middleware-http-to-https/Cargo.toml index bec6dc1..75dfd2c 100644 --- a/middleware/middleware-http-to-https/Cargo.toml +++ b/middleware/middleware-http-to-https/Cargo.toml @@ -5,8 +5,6 @@ edition = "2021" [dependencies] actix-web = { workspace = true, features = ["rustls"] } -actix-web-lab.workspace = true - env_logger.workspace = true futures-util.workspace = true log.workspace = true diff --git a/protobuf/Cargo.toml b/protobuf/Cargo.toml index ac100b6..6e436e1 100644 --- a/protobuf/Cargo.toml +++ b/protobuf/Cargo.toml @@ -9,5 +9,4 @@ actix-web.workspace = true env_logger.workspace = true log.workspace = true -prost = "0.11" -prost-derive = "0.11" +prost = { version = "0.11", features = ["prost-derive"] } diff --git a/protobuf/src/main.rs b/protobuf/src/main.rs index 10b56c0..868aca4 100644 --- a/protobuf/src/main.rs +++ b/protobuf/src/main.rs @@ -1,6 +1,6 @@ use actix_protobuf::{ProtoBuf, ProtoBufResponseBuilder as _}; use actix_web::{middleware, web, App, HttpResponse, HttpServer, Result}; -use prost_derive::Message; +use prost::Message; #[derive(Clone, PartialEq, Eq, Message)] pub struct MyObj { diff --git a/server-sent-events/Cargo.toml b/server-sent-events/Cargo.toml index 43bcb4d..4989d75 100644 --- a/server-sent-events/Cargo.toml +++ b/server-sent-events/Cargo.toml @@ -10,5 +10,3 @@ env_logger.workspace = true futures-util.workspace = true log.workspace = true parking_lot = "0.12" -tokio.workspace = true -tokio-stream = { version = "0.1.8", features = ["time"] } diff --git a/shutdown-server/Cargo.toml b/shutdown-server/Cargo.toml index 8ebaa32..acf7999 100644 --- a/shutdown-server/Cargo.toml +++ b/shutdown-server/Cargo.toml @@ -11,4 +11,3 @@ actix-web-lab.workspace = true env_logger.workspace = true log.workspace = true parking_lot = "0.12" -tokio = { workspace = true, features = ["signal"] } diff --git a/templating/yarte/Cargo.toml b/templating/yarte/Cargo.toml index f9962c8..fe1520e 100644 --- a/templating/yarte/Cargo.toml +++ b/templating/yarte/Cargo.toml @@ -4,6 +4,11 @@ version = "1.0.0" publish = false edition = "2021" +[package.metadata.cargo-machete] +ignored = [ + "yarte_helpers", # only build dep +] + [dependencies] actix-web.workspace = true derive_more.workspace = true diff --git a/websockets/chat-actorless/Cargo.toml b/websockets/chat-actorless/Cargo.toml index 37e2250..e4895a9 100644 --- a/websockets/chat-actorless/Cargo.toml +++ b/websockets/chat-actorless/Cargo.toml @@ -7,9 +7,7 @@ edition = "2021" actix-files.workspace = true actix-web.workspace = true actix-ws.workspace = true -awc.workspace = true -derive_more.workspace = true env_logger.workspace = true futures-util.workspace = true log.workspace = true diff --git a/websockets/chat-tcp/Cargo.toml b/websockets/chat-tcp/Cargo.toml index 2b3ad53..4657e32 100644 --- a/websockets/chat-tcp/Cargo.toml +++ b/websockets/chat-tcp/Cargo.toml @@ -19,7 +19,6 @@ actix-web.workspace = true actix-web-actors.workspace = true byteorder = "1.2" -bytes = "1" env_logger.workspace = true futures-util = { workspace = true, features = ["sink"] } log.workspace = true diff --git a/websockets/chat/Cargo.toml b/websockets/chat/Cargo.toml index b5032bb..a5b90ed 100644 --- a/websockets/chat/Cargo.toml +++ b/websockets/chat/Cargo.toml @@ -16,5 +16,3 @@ actix-web-actors.workspace = true env_logger.workspace = true log.workspace = true rand.workspace = true -serde = "1" -serde_json.workspace = true diff --git a/websockets/echo-actorless/Cargo.toml b/websockets/echo-actorless/Cargo.toml index cd93bd9..0e4b144 100644 --- a/websockets/echo-actorless/Cargo.toml +++ b/websockets/echo-actorless/Cargo.toml @@ -7,7 +7,6 @@ edition = "2021" actix-files.workspace = true actix-web.workspace = true actix-ws.workspace = true -awc.workspace = true env_logger.workspace = true futures-util.workspace = true diff --git a/websockets/echo/Cargo.toml b/websockets/echo/Cargo.toml index dc5df97..980ce36 100644 --- a/websockets/echo/Cargo.toml +++ b/websockets/echo/Cargo.toml @@ -13,7 +13,6 @@ path = "src/client.rs" [dependencies] actix.workspace = true -actix-codec.workspace = true actix-files.workspace = true actix-web.workspace = true actix-web-actors.workspace = true