Skip to content

Commit

Permalink
chore(ci): check unused dependencies (#3334)
Browse files Browse the repository at this point in the history
And move itoa to http1 feature
  • Loading branch information
tottoto authored Oct 4, 2023
1 parent da3fc76 commit e8e059e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- ffi-header
- doc
- check-external-types
- udeps
steps:
- run: exit 0

Expand Down Expand Up @@ -232,3 +233,22 @@ jobs:

- name: check-external-types
run: cargo check-external-types --config .github/workflows/external-types.toml

udeps:
needs: [style]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@nightly

- name: Install cargo-udeps
uses: taiki-e/install-action@cargo-udeps

- name: Check unused dependencies on default features
run: cargo udeps

- name: Check unused dependencies on full features
run: cargo udeps --features full
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ http-body = "=1.0.0-rc.2"
http-body-util = { version = "=0.1.0-rc.3", optional = true }
httparse = "1.8"
h2 = { version = "0.3.9", optional = true }
itoa = "1"
pin-project-lite = "0.2.4"
tokio = { version = "1", features = ["sync"] }

# Optional

httpdate = { version = "1.0", optional = true }
itoa = { version = "1", optional = true }
libc = { version = "0.2", optional = true }
tracing = { version = "0.1", default-features = false, features = ["std"], optional = true }
want = { version = "0.3", optional = true }
Expand Down Expand Up @@ -74,7 +74,7 @@ full = [
]

# HTTP versions
http1 = []
http1 = ["dep:itoa"]
http2 = ["dep:h2"]

# Client/Server
Expand Down

0 comments on commit e8e059e

Please sign in to comment.