From 52f502f7a6f1824471cd4ec8f52fa0b1fefd5724 Mon Sep 17 00:00:00 2001 From: Barry Pederson Date: Sat, 2 Nov 2024 16:07:05 -0700 Subject: [PATCH] Simplify Cargo.toml dependencies Still need two copies of the dependencies, but at least they're in one place now. --- Cargo.toml | 7 +++++-- client/Cargo.toml | 4 ++-- server/Cargo.toml | 4 ++-- server/src/options.rs | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3a11a79..5c94f6f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,9 +10,12 @@ members = [ "client", ] -#[workspace.dependencies] -#clap = { version = "4.5.20", features = ["derive"] } +[workspace.dependencies] +clap = { version = "4.5.20", features = ["derive"] } +common = { path = "common" } +# Why do I need a [dependencies] that duplicates the [workspace.dependencies]? +# without this it doesn't work. [dependencies] clap = { version = "4.5.20", features = ["derive"] } common = { path = "common" } diff --git a/client/Cargo.toml b/client/Cargo.toml index 24f0814..657ea9f 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -4,5 +4,5 @@ version = "0.2.0" edition = "2021" [dependencies] -clap = { version = "4.5.20", features = ["derive"] } -common = { path = "../common" } \ No newline at end of file +clap = { workspace = true } +common = { workspace = true } \ No newline at end of file diff --git a/server/Cargo.toml b/server/Cargo.toml index 0904991..d649067 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -4,5 +4,5 @@ version = "0.2.0" edition = "2021" [dependencies] -clap = { version = "4.5.20", features = ["derive"] } -common = { path = "../common" } \ No newline at end of file +clap = { workspace = true } +common = { workspace = true } \ No newline at end of file diff --git a/server/src/options.rs b/server/src/options.rs index 1e8b653..99d1afa 100644 --- a/server/src/options.rs +++ b/server/src/options.rs @@ -4,7 +4,7 @@ use clap::Parser; use std::sync::LazyLock; #[derive(Parser, Clone, Debug)] -/// saslauthd server/client +/// saslauthd server pub struct Opt { #[arg( short = 'f',