Skip to content

Commit 810c231

Browse files
authored
Merge pull request #10520 from Turbo87/machete
Use `cargo-machete` to remove unused dependency declarations
2 parents ff893c3 + c78e2ad commit 810c231

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ env:
1616
CARGO_TERM_COLOR: always
1717
# renovate: datasource=crate depName=cargo-deny versioning=semver
1818
CARGO_DENY_VERSION: 0.16.4
19+
# renovate: datasource=crate depName=cargo-machete versioning=semver
20+
CARGO_MACHETE_VERSION: 0.7.0
1921
# renovate: datasource=crate depName=grcov versioning=semver
2022
GRCOV_VERSION: 0.8.20
2123
# renovate: datasource=npm depName=pnpm
@@ -111,9 +113,19 @@ jobs:
111113
- run: cargo clippy --all-targets --all-features --workspace
112114
- run: cargo doc --no-deps --document-private-items
113115

116+
# to make https://github.com/rust-lang/team/blob/651fb3f9c64c934c9073472765d745a606dd9daf/repos/rust-lang/crates.io.toml#L17 happy until we migrated it…
114117
backend-cargo-deny:
115118
name: Backend / cargo-deny
116119
runs-on: ubuntu-24.04
120+
if: false
121+
steps:
122+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
123+
with:
124+
persist-credentials: false
125+
126+
backend-deps:
127+
name: Backend / dependencies
128+
runs-on: ubuntu-24.04
117129
needs: changed-files
118130
if: github.event_name != 'pull_request' || needs.changed-files.outputs.rust-lockfile == 'true'
119131

@@ -127,6 +139,9 @@ jobs:
127139
- run: cargo install cargo-deny --vers ${CARGO_DENY_VERSION}
128140
- run: cargo deny check
129141

142+
- run: cargo install cargo-machete --vers ${CARGO_MACHETE_VERSION}
143+
- run: cargo machete
144+
130145
backend-test:
131146
name: Backend / Test
132147
runs-on: ubuntu-24.04

Cargo.lock

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ unescaped_backticks = "warn"
2626
dbg_macro = "warn"
2727
todo = "warn"
2828

29+
[package.metadata.cargo-machete]
30+
ignored = ["krata-tokio-tar"]
31+
32+
[workspace.metadata.cargo-machete]
33+
ignored = ["krata-tokio-tar"]
34+
2935
[lints]
3036
workspace = true
3137

@@ -84,7 +90,6 @@ flate2 = "=1.0.35"
8490
futures-util = "=0.3.31"
8591
hex = "=0.4.3"
8692
http = "=1.2.0"
87-
http-body-util = "=0.1.2"
8893
hyper = { version = "=1.6.0", features = ["client", "http1"] }
8994
indexmap = { version = "=2.7.1", features = ["serde"] }
9095
indicatif = "=0.17.11"

crates/crates_io_worker/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ workspace = true
99

1010
[dependencies]
1111
anyhow = "=1.0.95"
12-
deadpool-diesel = { version = "=0.6.1", features = ["postgres", "tracing"] }
1312
diesel = { version = "=2.2.7", features = ["postgres", "serde_json"] }
1413
diesel-async = { version = "=0.5.2", features = ["async-connection-wrapper", "deadpool", "postgres"] }
1514
futures-util = "=0.3.31"

0 commit comments

Comments
 (0)