Repository: tower-rs/tower (rust)

Issue:
use workspace dependencies
It's easier to maintain and also easier to see what is used by using workspace dependencies.
For the crate itself it doesn't change much and for the user it works the same.
It's however easier ergonomics for maintainers and contributors.

I can open a PR for you if you want,
pretty easy to transition to it thanks to a tool by luke:
https://github.com/mainmatter/cargo-autoinherit

Pull request:
use workspace dependencies for tower
Closes #776

Patch:
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index 484221e..4b0c6b0 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -3,68 +3,60 @@ name: CI
 on:
   push:
     branches:
-    - master
+      - master
   pull_request: {}
 
 env:
-  MSRV: 1.63.0
+  MSRV: 1.64.0
 
 jobs:
   check-stable:
     # Run `cargo check` first to ensure that the pushed code at least compiles.
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@master
-    - uses: dtolnay/rust-toolchain@master
-      with:
-        toolchain: stable
-    - name: Check
-      run: cargo check --workspace --all-features --all-targets
+      - uses: actions/checkout@v4
+      - uses: dtolnay/rust-toolchain@stable
+      - name: Check
+        run: cargo check --workspace --all-features --all-targets
 
   check-docs:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@master
-    - uses: dtolnay/rust-toolchain@master
-      with:
-        toolchain: stable
-    - name: cargo doc
-      working-directory: ${{ matrix.subcrate }}
-      env:
-        RUSTDOCFLAGS: "-D rustdoc::broken_intra_doc_links"
-      run: cargo doc --all-features --no-deps
+      - uses: actions/checkout@v4
+      - uses: dtolnay/rust-toolchain@stable
+      - name: cargo doc
+        working-directory: ${{ matrix.subcrate }}
+        env:
+          RUSTDOCFLAGS: "-D rustdoc::broken_intra_doc_links"
+        run: cargo doc --all-features --no-deps
 
   check-msrv:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@master
-    - name: "install Rust ${{ env.MSRV }}"
-      uses: dtolnay/rust-toolchain@master
-      with:
-        toolchain: ${{ env.MSRV }}
-    - name: "install Rust nightly"
-      uses: dtolnay/rust-toolchain@master
-      with:
-        toolchain: nightly
-    - name: Select minimal versions
-      run: cargo update -Z minimal-versions
-    - name: Check
-      run: |
-        rustup default ${{ env.MSRV }}
-        cargo check --all --all-targets --all-features --locked
+      - uses: actions/checkout@v4
+      - name: "install Rust ${{ env.MSRV }}"
+        uses: dtolnay/rust-toolchain@master
+        with:
+          toolchain: ${{ env.MSRV }}
+      - name: "install Rust nightly"
+        uses: dtolnay/rust-toolchain@nightly
+      - name: Select minimal versions
+        run: cargo update -Z minimal-versions
+      - name: Check
+        run: |
+          rustup default ${{ env.MSRV }}
+          cargo check --all --all-targets --all-features --locked
 
   cargo-hack:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@master
-    - uses: dtolnay/rust-toolchain@master
-      with:
-        toolchain: stable
-    - name: install cargo-hack
-      uses: taiki-e/install-action@cargo-hack
-    - name: cargo hack check
-      working-directory: ${{ matrix.subcrate }}
-      run: cargo hack check --each-feature --no-dev-deps --workspace
+      - uses: actions/checkout@v4
+      - uses: dtolnay/rust-toolchain@stable
+      - name: install cargo-hack
+        uses: taiki-e/install-action@cargo-hack
+      - name: cargo hack check
+        working-directory: ${{ matrix.subcrate }}
+        run: cargo hack check --each-feature --no-dev-deps --workspace
 
   test-versions:
     # Test against the stable, beta, and nightly Rust toolchains on ubuntu-latest.
@@ -78,51 +70,48 @@ jobs:
       matrix:
         rust: [stable, beta, nightly]
     steps:
-    - uses: actions/checkout@master
-    - name: "install Rust ${{ matrix.rust }}"
-      uses: dtolnay/rust-toolchain@master
-      with:
-        toolchain: ${{ matrix.rust }}
-    - name: Run tests
-      run: cargo test --workspace --all-features
+      - uses: actions/checkout@v4
+      - name: "install Rust ${{ matrix.rust }}"
+        uses: dtolnay/rust-toolchain@master
+        with:
+          toolchain: ${{ matrix.rust }}
+      - name: Run tests
+        run: cargo test --workspace --all-features
 
   test-msrv:
     needs: check-msrv
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@master
-    - name: "install Rust ${{ env.MSRV }}"
-      uses: dtolnay/rust-toolchain@master
-      with:
-        toolchain: ${{ env.MSRV }}
-    - name: "install Rust nightly"
-      uses: dtolnay/rust-toolchain@master
-      with:
-        toolchain: nightly
-    - name: Select minimal versions
-      run: cargo update -Z minimal-versions
-    - name: test
-      run: |
-        rustup default ${{ env.MSRV }}
-        cargo check --workspace --all-features --locked
+      - uses: actions/checkout@v4
+      - name: "install Rust ${{ env.MSRV }}"
+        uses: dtolnay/rust-toolchain@master
+        with:
+          toolchain: ${{ env.MSRV }}
+      - name: "install Rust nightly"
+        uses: dtolnay/rust-toolchain@nightly
+      - name: Select minimal versions
+        run: cargo update -Z minimal-versions
+      - name: test
+        run: |
+          rustup default ${{ env.MSRV }}
+          cargo check --workspace --all-features --locked
 
   style:
     needs: check-stable
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@master
-    - uses: dtolnay/rust-toolchain@master
-      with:
-        toolchain: stable
-        components: rustfmt
-    - name: rustfmt
-      run: cargo fmt --all -- --check
+      - uses: actions/checkout@v4
+      - uses: dtolnay/rust-toolchain@stable
+        with:
+          components: rustfmt
+      - name: rustfmt
+        run: cargo fmt --all -- --check
 
   deny-check:
     name: cargo-deny check
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v4
-    - uses: EmbarkStudios/cargo-deny-action@v1
-      with:
-        command: check
+      - uses: actions/checkout@v4
+      - uses: EmbarkStudios/cargo-deny-action@v1
+        with:
+          command: check
diff --git a/Cargo.toml b/Cargo.toml
index b7d4757..bbea402 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,3 +6,23 @@ members = [
   "tower-service",
   "tower-test",
 ]
+
+[workspace.dependencies]
+futures = "0.3.22"
+futures-core = "0.3.22"
+futures-util = { version = "0.3.22", default-features = false }
+hdrhistogram = { version = "7.0", default-features = false }
+http = "0.2"
+indexmap = "2.0.2"
+lazy_static = "1.4.0"
+pin-project-lite = "0.2.7"
+quickcheck = "1"
+rand = "0.8"
+slab = "0.4"
+sync_wrapper = "0.1.1"
+tokio = "1.6.2"
+tokio-stream = "0.1.0"
+tokio-test = "0.4"
+tokio-util = { version = "0.7.0", default-features = false }
+tracing = { version = "0.1.2", default-features = false }
+tracing-subscriber = { version = "0.3", default-features = false }
diff --git a/README.md b/README.md
index a0716a4..c250b1c 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ pattern. If your protocol is entirely stream based, Tower may not be a good fit.
 
 Tower will keep a rolling MSRV (minimum supported Rust version) policy of **at
 least** 6 months. When increasing the MSRV, the new Rust version must have been
-released at least six months ago. The current MSRV is 1.63.0.
+released at least six months ago. The current MSRV is 1.64.0.
 
 ## Getting Started
 
diff --git a/tower-service/Cargo.toml b/tower-service/Cargo.toml
index 6fc60f7..0e6f5b2 100644
--- a/tower-service/Cargo.toml
+++ b/tower-service/Cargo.toml
@@ -22,7 +22,7 @@ edition = "2018"
 [dependencies]
 
 [dev-dependencies]
-http = "0.2"
+http = { workspace = true }
 tower-layer = { version = "0.3", path = "../tower-layer" }
-tokio = { version = "1", features = ["macros", "time"] }
-futures = "0.3.22"
+tokio = { workspace = true, features = ["macros", "time"] }
+futures = { workspace = true }
diff --git a/tower/Cargo.toml b/tower/Cargo.toml
index 4cd140e..4529d8c 100644
--- a/tower/Cargo.toml
+++ b/tower/Cargo.toml
@@ -20,7 +20,7 @@ clients and servers.
 categories = ["asynchronous", "network-programming"]
 keywords = ["io", "async", "non-blocking", "futures", "service"]
 edition = "2018"
-rust-version = "1.63.0"
+rust-version = "1.64.0"
 
 [features]
 
@@ -68,32 +68,32 @@ util = ["__common", "futures-util", "pin-project-lite", "sync_wrapper"]
 tower-layer = { version = "0.3.1", path = "../tower-layer" }
 tower-service = { version = "0.3.1", path = "../tower-service" }
 
-futures-core = { version = "0.3", optional = true }
-futures-util = { version = "0.3", default-features = false, features = ["alloc"], optional = true }
-hdrhistogram = { version = "7.0", optional = true, default-features = false }
-indexmap = { version = "2.0.2", optional = true }
-slab = { version = "0.4", optional = true }
-tokio = { version = "1.6", optional = true, features = ["sync"] }
-tokio-stream = { version = "0.1.0", optional = true }
-tokio-util = { version = "0.7.0", default-features = false, optional = true }
-tracing = { version = "0.1.2", default-features = false, features = ["std"], optional = true }
-pin-project-lite = { version = "0.2.7", optional = true }
-sync_wrapper = { version = "0.1.1", optional = true }
+futures-core = { workspace = true, optional = true }
+futures-util = { workspace = true, features = ["alloc"], optional = true }
+hdrhistogram = { workspace = true, optional = true }
+indexmap = { workspace = true, optional = true }
+slab = { workspace = true, optional = true }
+tokio = { workspace = true, features = ["sync"], optional = true }
+tokio-stream = { workspace = true, optional = true }
+tokio-util = { workspace = true, optional = true }
+tracing = { workspace = true, features = ["std"], optional = true }
+pin-project-lite = { workspace = true, optional = true }
+sync_wrapper = { workspace = true, optional = true }
 
 [dev-dependencies]
-futures = "0.3.22"
-hdrhistogram = { version = "7.0", default-features = false }
-pin-project-lite = "0.2.7"
-tokio = { version = "1.6.2", features = ["macros", "sync", "test-util", "rt-multi-thread"] }
-tokio-stream = "0.1"
-tokio-test = "0.4"
+futures = { workspace = true }
+hdrhistogram = { workspace = true }
+pin-project-lite = { workspace = true }
+tokio = { workspace = true, features = ["macros", "sync", "test-util", "rt-multi-thread"] }
+tokio-stream = { workspace = true }
+tokio-test = { workspace = true }
 tower-test = { version = "0.4", path = "../tower-test" }
-tracing = { version = "0.1.2", default-features = false, features = ["std"] }
-tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "ansi"] }
-http = "0.2"
-lazy_static = "1.4.0"
-rand = { version = "0.8", features = ["small_rng"] }
-quickcheck = "1"
+tracing = { workspace = true, features = ["std"] }
+tracing-subscriber = { workspace = true, features = ["fmt", "ansi"] }
+http = { workspace = true }
+lazy_static = { workspace = true }
+rand = { workspace = true, features = ["small_rng"] }
+quickcheck = { workspace = true }
 
 [package.metadata.docs.rs]
 all-features = true
diff --git a/tower/README.md b/tower/README.md
index b277f74..f5d196d 100644
--- a/tower/README.md
+++ b/tower/README.md
@@ -74,7 +74,7 @@ application code, libraries providing middleware implementations, and
 libraries that implement servers and/or clients for various network
 protocols.
 
-Depending on your particular use case, you might use Tower in several ways: 
+Depending on your particular use case, you might use Tower in several ways:
 
 * **Implementing application logic** for a networked program. You might
   use the [`Service`] trait to model your application's behavior, and use
@@ -174,7 +174,7 @@ Tower.
 
 Tower will keep a rolling MSRV (minimum supported Rust version) policy of **at
 least** 6 months. When increasing the MSRV, the new Rust version must have been
-released at least six months ago. The current MSRV is 1.63.0.
+released at least six months ago. The current MSRV is 1.64.0.
 
 ## License
 
diff --git a/tower/src/lib.rs b/tower/src/lib.rs
index 003ebce..179edfb 100644
--- a/tower/src/lib.rs
+++ b/tower/src/lib.rs
@@ -144,7 +144,7 @@
 //!
 //! Tower will keep a rolling MSRV (minimum supported Rust version) policy of **at
 //! least** 6 months. When increasing the MSRV, the new Rust version must have been
-//! released at least six months ago. The current MSRV is 1.63.0.
+//! released at least six months ago. The current MSRV is 1.64.0.
 //!
 //! [`Service`]: crate::Service
 //! [`Layer`]: crate::Layer


Test patch:
diff --git a/tower-test/Cargo.toml b/tower-test/Cargo.toml
index 2c01cae..fad3cd5 100644
--- a/tower-test/Cargo.toml
+++ b/tower-test/Cargo.toml
@@ -20,12 +20,12 @@ categories = ["asynchronous", "network-programming"]
 edition = "2018"
 
 [dependencies]
-futures-util = { version = "0.3", default-features = false }
-tokio = { version = "1.0", features = ["sync"] }
-tokio-test = "0.4"
+futures-util = { workspace = true }
+tokio = { workspace = true, features = ["sync"] }
+tokio-test = { workspace = true }
 tower-layer = { version = "0.3", path = "../tower-layer" }
 tower-service = { version = "0.3", path = "../tower-service" }
-pin-project-lite = "0.2"
+pin-project-lite = { workspace = true }
 
 [dev-dependencies]
-tokio = { version = "1.0", features = ["macros"] }
+tokio = { workspace = true, features = ["macros"] }