From df509eadc9aecef605194b7c97c5fb02bf928b79 Mon Sep 17 00:00:00 2001 From: Vika Date: Wed, 1 Jan 2025 05:32:37 +0300 Subject: Use workspace dependencies to simplify dependency management This will reduce risks of dependency duplication in the tree when updating or adding new dependencies, as one could simply inherit from the workspace. `cargo-autoinherit` was considered, but it migrates EVERY single dependency, whereas I'd prefer that only reused dependencies are migrated. Additionally, it doesn't merge features automatically, requiring manual intervention anyway. Change-Id: If0dd19012c723ab71f599119d108e805b2d5e463 --- indieauth/Cargo.toml | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) (limited to 'indieauth/Cargo.toml') diff --git a/indieauth/Cargo.toml b/indieauth/Cargo.toml index 7f18dfa..3bc3864 100644 --- a/indieauth/Cargo.toml +++ b/indieauth/Cargo.toml @@ -8,24 +8,15 @@ default = [] axum = ["dep:axum-core", "dep:serde_json", "dep:http"] [dev-dependencies] -serde_json = "^1.0.134" # A JSON serialization file format -serde_urlencoded = "^0.7.1" # `x-www-form-urlencoded` meets Serde +serde_json = { workspace = true } # A JSON serialization file format +serde_urlencoded = { workspace = true } # `x-www-form-urlencoded` meets Serde + [dependencies] -rand = "^0.8.5" # Utilities for random number generation -data-encoding = "^2.6.0" # Efficient and customizable data-encoding functions like base64, base32, and hex -sha2 = "^0.10.8" # SHA-2 series of algorithms for Rust -[dependencies.url] # URL library for Rust, based on the WHATWG URL Standard -version = "^2.5.4" -features = ["serde"] -[dependencies.serde] # A generic serialization/deserialization framework -version = "^1.0.217" -features = ["derive"] -[dependencies.axum-core] -version = "^0.4.5" -optional = true -[dependencies.serde_json] -version = "^1.0.134" -optional = true -[dependencies.http] -version = "^1.2" -optional = true +axum-core = { workspace = true, optional = true } +data-encoding = { workspace = true } +http = { workspace = true, optional = true } +rand = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true, optional = true } +sha2 = { workspace = true } +url = { workspace = true } -- cgit 1.4.1