From a0256a3095aaae334aca21ae6cb02289812e5b24 Mon Sep 17 00:00:00 2001 From: Rohit Sachdeva Date: Fri, 10 Jan 2025 14:37:11 -0600 Subject: [PATCH] refactor: centralize dependency features in workspace root --- Cargo.toml | 11 +++++++++++ chatty-tcp/Cargo.toml | 16 ++++++++-------- chatty-types/Cargo.toml | 8 ++++---- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6c415e3..61cc18d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,3 +9,14 @@ default-members = [ ] resolver = "2" + +[workspace.dependencies] +anyhow = "1.0.95" +clap = "4.5.26" +serde = "1.0.217" +serde_json = "1.0.135" +thiserror = "2.0.11" +tokio = "1" +tokio-test = "0.4.4" +tracing = "0.1.41" +tracing-subscriber = "0.3.19" diff --git a/chatty-tcp/Cargo.toml b/chatty-tcp/Cargo.toml index 31b2a4a..f076d46 100644 --- a/chatty-tcp/Cargo.toml +++ b/chatty-tcp/Cargo.toml @@ -4,18 +4,18 @@ version = "0.0.1" edition = "2021" [dependencies] -tokio = { version = "1", features = ["full"] } -tracing = "0.1.41" -thiserror = "2.0.11" -anyhow = "1.0.95" -serde = "1.0.217" -serde_json = "1.0.135" -clap = { version = "4.5.26", features = ["derive"] } +tokio = { workspace = true, features = ["full"] } +tracing = { workspace = true } +thiserror = { workspace = true } +anyhow = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +clap = { workspace = true, features = ["derive"] } # workspace member depdenencies chatty-types = { path = "../chatty-types" } [dev-dependencies] -tokio-test = "0.4.4" +tokio-test = { workspace = true } [[bin]] name = "server" diff --git a/chatty-types/Cargo.toml b/chatty-types/Cargo.toml index f6b55fc..5c502f4 100644 --- a/chatty-types/Cargo.toml +++ b/chatty-types/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" edition = "2021" [dependencies] -tracing = "0.1.41" -tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } -anyhow = "1.0.95" -serde = { version = "1.0.217", features = ["derive"] } +tracing = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } +anyhow = { workspace = true } +serde = { workspace = true, features = ["derive"] }