From dbf497570042e87a958c16585c47c45a8606291d Mon Sep 17 00:00:00 2001 From: Gabriel de Perthuis Date: Mon, 1 Apr 2024 13:21:08 +0200 Subject: [PATCH] Remove unused dependencies Found with cargo machete: https://lib.rs/crates/cargo-machete --- Cargo.toml | 1 - examples/diesel/Cargo.toml | 9 --------- examples/readme/Cargo.toml | 14 -------------- examples/readme/src/main.rs | 19 ------------------- lapin/Cargo.toml | 3 +++ memcached/Cargo.toml | 5 +++-- sqlite/Cargo.toml | 1 - 7 files changed, 6 insertions(+), 46 deletions(-) delete mode 100644 examples/readme/Cargo.toml delete mode 100644 examples/readme/src/main.rs diff --git a/Cargo.toml b/Cargo.toml index 61c7328..45850c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,6 @@ deadpool-runtime = { version = "0.1", path = "./runtime" } # `tokio::sync::Semaphore`. No other features of `tokio` are enabled or used # unless the `rt_tokio_1` feature is enabled. tokio = { version = "1.0", features = ["sync"] } -console = "0.15.7" [dev-dependencies] async-std = { version = "1.0", features = ["attributes"] } diff --git a/examples/diesel/Cargo.toml b/examples/diesel/Cargo.toml index 44b7a6b..e176fdf 100644 --- a/examples/diesel/Cargo.toml +++ b/examples/diesel/Cargo.toml @@ -7,15 +7,6 @@ authors = ["Michael P. Jung "] publish = false [dependencies] -actix-web = "4.0.1" -anyhow = "1.0.65" -config = "0.14" -deadpool = { path = "../.." } deadpool-diesel = { path = "../../diesel", features = ["postgres"] } -diesel = { version = "2.0.0", features = ["postgres", "chrono"] } dotenvy = "0.15" -serde = { version = "1.0", features = ["derive"] } thiserror = "1.0" -tokio = { version = "1", features = ["rt-multi-thread", "macros"] } -tokio-postgres = { version = "0.7", features = ["with-uuid-1"] } -uuid = { version = "1", features = ["serde"] } diff --git a/examples/readme/Cargo.toml b/examples/readme/Cargo.toml deleted file mode 100644 index 17f17b4..0000000 --- a/examples/readme/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "readme" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -config = "0.14" -deadpool-postgres = { path = "../../postgres", features = ["serde"] } -dotenvy = "0.15.7" -serde = { version = "1.0.195", features = ["derive"] } -tokio = { version = "1.35.1", features = ["macros", "rt-multi-thread"] } -tokio-postgres = "0.7.10" diff --git a/examples/readme/src/main.rs b/examples/readme/src/main.rs deleted file mode 100644 index 9e4c159..0000000 --- a/examples/readme/src/main.rs +++ /dev/null @@ -1,19 +0,0 @@ -trait F { - fn f(&self); -} - -impl F for i32 { - fn f(&self) {} -} - -fn f(f_arr: &[&dyn F]) { - for f in f_arr { - f.f(); - } -} - -fn main() { - for i in 0..10 { - f(&[&i]); - } -} diff --git a/lapin/Cargo.toml b/lapin/Cargo.toml index 6264962..0e67e7c 100644 --- a/lapin/Cargo.toml +++ b/lapin/Cargo.toml @@ -41,3 +41,6 @@ async-global-executor = { version = "2.3.1", optional = true, default-features = config = { version = "0.14", features = ["json"] } dotenvy = "0.15" tokio = { version = "1.0", features = ["sync", "macros", "rt-multi-thread"] } + +[package.metadata.cargo-machete] +ignored = ["async-global-executor"] diff --git a/memcached/Cargo.toml b/memcached/Cargo.toml index 5f4363d..22bd3dc 100644 --- a/memcached/Cargo.toml +++ b/memcached/Cargo.toml @@ -26,10 +26,11 @@ async-memcached = { version = "0.1", default-features = false } deadpool = { path = "../", version = "0.11.0", default-features = false, features = [ "managed", ] } -futures = { version = "0.3", features = ["compat"] } -log = "0.4" # This crate doesn't directly depend on tokio but async-memcached 0.1.7 # broke the build by forgetting to add the "net" feature to the tokio # dependency. Once async-memcached is fixed this dependency can be removed # again. tokio = { version = "1.0", default-features = false, features = ["net"] } + +[package.metadata.cargo-machete] +ignored = ["tokio"] diff --git a/sqlite/Cargo.toml b/sqlite/Cargo.toml index 42526cb..65d2faa 100644 --- a/sqlite/Cargo.toml +++ b/sqlite/Cargo.toml @@ -33,5 +33,4 @@ serde = { package = "serde", version = "1.0", features = [ [dev-dependencies] config = { version = "0.14", features = ["json"] } -dotenvy = "0.15" tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }