Skip to content

Commit 6886b28

Browse files
committed
url-standard feature
1 parent 2b81447 commit 6886b28

File tree

18 files changed

+147
-97
lines changed

18 files changed

+147
-97
lines changed

.github/workflows/coverage.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ jobs:
2424
- uses: taiki-e/install-action@cargo-llvm-cov
2525
- run: |
2626
cargo llvm-cov clean --workspace
27-
cargo llvm-cov --no-report --no-default-features --package http-cache --features manager-cacache,with-http-types,manager-moka,streaming-tokio
28-
cargo llvm-cov --no-report --no-default-features --package http-cache --features manager-foyer,with-http-types,streaming-tokio
29-
cargo llvm-cov --no-report --package http-cache-surf --all-features
30-
cargo llvm-cov --no-report --package http-cache-ureq --no-default-features --features manager-cacache
31-
cargo llvm-cov --no-report --package http-cache-ureq --all-features
32-
cargo llvm-cov --no-report --package http-cache-reqwest --all-features
33-
cargo llvm-cov --no-report --package http-cache-tower --all-features
34-
cargo llvm-cov --no-report --package http-cache-quickcache --all-features
27+
cargo llvm-cov --no-report --no-default-features --package http-cache --features manager-cacache,with-http-types,manager-moka,streaming-tokio,url-standard
28+
cargo llvm-cov --no-report --no-default-features --package http-cache --features manager-foyer,with-http-types,streaming-tokio,url-standard
29+
cargo llvm-cov --no-report --package http-cache-surf --no-default-features --features manager-cacache,manager-moka,manager-foyer,rate-limiting,http-headers-compat,url-standard
30+
cargo llvm-cov --no-report --package http-cache-ureq --no-default-features --features manager-cacache,url-standard
31+
cargo llvm-cov --no-report --package http-cache-ureq --no-default-features --features manager-cacache,manager-moka,manager-foyer,json,rate-limiting,http-headers-compat,url-standard
32+
cargo llvm-cov --no-report --package http-cache-reqwest --no-default-features --features manager-cacache,manager-moka,manager-foyer,streaming,rate-limiting,http-headers-compat,url-standard
33+
cargo llvm-cov --no-report --package http-cache-tower --no-default-features --features manager-cacache,manager-moka,manager-foyer,streaming,rate-limiting,http-headers-compat,url-standard
34+
cargo llvm-cov --no-report --package http-cache-quickcache --no-default-features --features http-headers-compat,url-standard
3535
cargo llvm-cov report --lcov --output-path lcov.info
3636
- uses: codecov/codecov-action@v5
3737
with:

.github/workflows/http-cache-quickcache.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ jobs:
4242
- uses: actions/checkout@v4
4343
- uses: dtolnay/rust-toolchain@stable
4444
- run: |
45-
cargo test --all-targets --all-features
45+
cargo test --all-targets --no-default-features --features http-headers-compat,url-standard
46+
cargo test --all-targets --no-default-features --features http-headers-compat,url-ada
4647
4748
clippy:
4849
name: Check clippy
@@ -54,7 +55,8 @@ jobs:
5455
with:
5556
components: "clippy"
5657
- run: |
57-
cargo clippy --lib --tests --all-targets --all-features -- -D warnings
58+
cargo clippy --lib --tests --all-targets --no-default-features --features http-headers-compat,url-standard -- -D warnings
59+
cargo clippy --lib --tests --all-targets --no-default-features --features http-headers-compat,url-ada -- -D warnings
5860
5961
docs:
6062
name: Build docs
@@ -66,5 +68,5 @@ jobs:
6668
env:
6769
RUSTDOCFLAGS: --cfg docsrs -Dwarnings
6870
- run: |
69-
cargo doc --no-deps --document-private-items
70-
cargo test --doc --all-features
71+
cargo doc --no-deps --document-private-items --no-default-features --features http-headers-compat,url-standard
72+
cargo test --doc --no-default-features --features http-headers-compat,url-standard

.github/workflows/http-cache-reqwest.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- uses: actions/checkout@v4
4343
- uses: dtolnay/rust-toolchain@stable
4444
- run: |
45-
cargo test --all-targets --all-features
45+
cargo test --all-targets --no-default-features --features manager-cacache,manager-moka,manager-foyer,streaming,rate-limiting,http-headers-compat,url-standard
4646
cargo test --all-targets --no-default-features --features manager-cacache,url-ada
4747
4848
clippy:
@@ -55,7 +55,7 @@ jobs:
5555
with:
5656
components: "clippy"
5757
- run: |
58-
cargo clippy --lib --tests --all-targets --all-features -- -D warnings
58+
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,manager-moka,manager-foyer,streaming,rate-limiting,http-headers-compat,url-standard -- -D warnings
5959
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,url-ada -- -D warnings
6060
6161
docs:
@@ -68,5 +68,5 @@ jobs:
6868
env:
6969
RUSTDOCFLAGS: --cfg docsrs -Dwarnings
7070
- run: |
71-
cargo doc --no-deps --document-private-items
72-
cargo test --doc --all-features
71+
cargo doc --no-deps --document-private-items --no-default-features --features manager-cacache,manager-moka,manager-foyer,streaming,rate-limiting,http-headers-compat,url-standard
72+
cargo test --doc --no-default-features --features manager-cacache,manager-moka,manager-foyer,streaming,rate-limiting,http-headers-compat,url-standard

.github/workflows/http-cache-surf.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ jobs:
4242
- uses: actions/checkout@v4
4343
- uses: dtolnay/rust-toolchain@stable
4444
- run: |
45-
cargo test --all-targets --all-features
45+
cargo test --all-targets --no-default-features --features manager-cacache,manager-moka,manager-foyer,rate-limiting,http-headers-compat,url-standard
46+
cargo test --all-targets --no-default-features --features manager-cacache,url-ada
4647
4748
clippy:
4849
name: Check clippy
@@ -54,7 +55,8 @@ jobs:
5455
with:
5556
components: "clippy"
5657
- run: |
57-
cargo clippy --lib --tests --all-targets --all-features -- -D warnings
58+
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,manager-moka,manager-foyer,rate-limiting,http-headers-compat,url-standard -- -D warnings
59+
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,url-ada -- -D warnings
5860
5961
docs:
6062
name: Build docs
@@ -66,5 +68,5 @@ jobs:
6668
env:
6769
RUSTDOCFLAGS: --cfg docsrs -Dwarnings
6870
- run: |
69-
cargo doc --no-deps --document-private-items
70-
cargo test --doc --all-features
71+
cargo doc --no-deps --document-private-items --no-default-features --features manager-cacache,manager-moka,manager-foyer,rate-limiting,http-headers-compat,url-standard
72+
cargo test --doc --no-default-features --features manager-cacache,manager-moka,manager-foyer,rate-limiting,http-headers-compat,url-standard

.github/workflows/http-cache-tower.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- uses: actions/checkout@v4
4343
- uses: dtolnay/rust-toolchain@stable
4444
- run: |
45-
cargo test --all-targets --all-features
45+
cargo test --all-targets --no-default-features --features manager-cacache,manager-moka,manager-foyer,streaming,rate-limiting,http-headers-compat,url-standard
4646
cargo test --all-targets --no-default-features --features manager-cacache,url-ada
4747
4848
examples:
@@ -65,7 +65,7 @@ jobs:
6565
with:
6666
components: "clippy"
6767
- run: |
68-
cargo clippy --lib --tests --all-targets --all-features -- -D warnings
68+
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,manager-moka,manager-foyer,streaming,rate-limiting,http-headers-compat,url-standard -- -D warnings
6969
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,url-ada -- -D warnings
7070
7171
docs:
@@ -78,5 +78,5 @@ jobs:
7878
env:
7979
RUSTDOCFLAGS: --cfg docsrs -Dwarnings
8080
- run: |
81-
cargo doc --no-deps --document-private-items
82-
cargo test --doc --all-features
81+
cargo doc --no-deps --document-private-items --no-default-features --features manager-cacache,manager-moka,manager-foyer,streaming,rate-limiting,http-headers-compat,url-standard
82+
cargo test --doc --no-default-features --features manager-cacache,manager-moka,manager-foyer,streaming,rate-limiting,http-headers-compat,url-standard

.github/workflows/http-cache-ureq.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ jobs:
4242
- uses: actions/checkout@v4
4343
- uses: dtolnay/rust-toolchain@stable
4444
- run: |
45-
cargo test --all-targets --no-default-features --features manager-cacache
46-
cargo test --all-targets --all-features
45+
cargo test --all-targets --no-default-features --features manager-cacache,url-standard
46+
cargo test --all-targets --no-default-features --features manager-cacache,manager-moka,manager-foyer,json,rate-limiting,http-headers-compat,url-standard
4747
cargo test --all-targets --no-default-features --features manager-cacache,url-ada
4848
4949
clippy:
@@ -56,8 +56,8 @@ jobs:
5656
with:
5757
components: "clippy"
5858
- run: |
59-
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache -- -D warnings
60-
cargo clippy --lib --tests --all-targets --all-features -- -D warnings
59+
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,url-standard -- -D warnings
60+
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,manager-moka,manager-foyer,json,rate-limiting,http-headers-compat,url-standard -- -D warnings
6161
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,url-ada -- -D warnings
6262
6363
docs:
@@ -70,5 +70,5 @@ jobs:
7070
env:
7171
RUSTDOCFLAGS: --cfg docsrs -Dwarnings
7272
- run: |
73-
cargo doc --no-deps --document-private-items
74-
cargo test --doc --all-features
73+
cargo doc --no-deps --document-private-items --no-default-features --features manager-cacache,manager-moka,manager-foyer,json,rate-limiting,http-headers-compat,url-standard
74+
cargo test --doc --no-default-features --features manager-cacache,manager-moka,manager-foyer,json,rate-limiting,http-headers-compat,url-standard

.github/workflows/http-cache.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ jobs:
4242
- uses: actions/checkout@v4
4343
- uses: dtolnay/rust-toolchain@stable
4444
- run: |
45-
cargo test --all-targets --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,http-headers-compat
46-
cargo test --all-targets --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,rate-limiting,http-headers-compat
47-
cargo test --all-targets --no-default-features --features manager-foyer,with-http-types,streaming-tokio,http-headers-compat
48-
cargo test --all-targets --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio
45+
cargo test --all-targets --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,http-headers-compat,url-standard
46+
cargo test --all-targets --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,rate-limiting,http-headers-compat,url-standard
47+
cargo test --all-targets --no-default-features --features manager-foyer,with-http-types,streaming-tokio,http-headers-compat,url-standard
48+
cargo test --all-targets --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,url-standard
4949
cargo test --all-targets --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,url-ada
5050
5151
clippy:
@@ -58,10 +58,10 @@ jobs:
5858
with:
5959
components: "clippy"
6060
- run: |
61-
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,http-headers-compat -- -D warnings
62-
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,rate-limiting,http-headers-compat -- -D warnings
63-
cargo clippy --lib --tests --all-targets --no-default-features --features manager-foyer,with-http-types,streaming-tokio,http-headers-compat -- -D warnings
64-
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio -- -D warnings
61+
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,http-headers-compat,url-standard -- -D warnings
62+
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,rate-limiting,http-headers-compat,url-standard -- -D warnings
63+
cargo clippy --lib --tests --all-targets --no-default-features --features manager-foyer,with-http-types,streaming-tokio,http-headers-compat,url-standard -- -D warnings
64+
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,url-standard -- -D warnings
6565
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,url-ada -- -D warnings
6666
6767
docs:
@@ -74,7 +74,7 @@ jobs:
7474
env:
7575
RUSTDOCFLAGS: --cfg docsrs -Dwarnings
7676
- run: |
77-
cargo doc --no-deps --document-private-items --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,http-headers-compat
78-
cargo test --doc --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,http-headers-compat
79-
cargo test --doc --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,rate-limiting,http-headers-compat
80-
cargo test --doc --no-default-features --features manager-foyer,with-http-types,streaming-tokio,http-headers-compat
77+
cargo doc --no-deps --document-private-items --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,http-headers-compat,url-standard
78+
cargo test --doc --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,http-headers-compat,url-standard
79+
cargo test --doc --no-default-features --features manager-cacache,with-http-types,manager-moka,streaming-tokio,rate-limiting,http-headers-compat,url-standard
80+
cargo test --doc --no-default-features --features manager-foyer,with-http-types,streaming-tokio,http-headers-compat,url-standard

http-cache-quickcache/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ async-trait = "0.1.85"
2020
postcard = { version = "1.1", default-features = false, features = ["alloc"] }
2121
http-cache-semantics = "2.1.0"
2222
serde = { version = "1.0.217", features = ["derive"] }
23-
url = { version = "2.5.4", features = ["serde"] }
2423
quick_cache = "0.6.9"
2524
http = "1.2.0"
2625

@@ -46,12 +45,15 @@ tower = "0.5.1"
4645
tower-http = { version = "0.6.2", features = ["trace"] }
4746
tower-service = "0.3.3"
4847
hyper = "1.5.1"
48+
url = { version = "2.5.4", features = ["serde"] }
4949

5050
[dev-dependencies.http-cache-reqwest]
5151
path = "../http-cache-reqwest"
5252

5353
[features]
54-
default = []
54+
default = ["url-standard"]
55+
url-standard = ["http-cache/url-standard"]
56+
url-ada = ["http-cache/url-ada"]
5557
http-headers-compat = ["http-cache/http-headers-compat"]
5658

5759
[package.metadata.docs.rs]

http-cache-reqwest/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,13 @@ name = "reqwest_streaming"
6060
required-features = ["streaming"]
6161

6262
[features]
63-
default = ["manager-cacache"]
63+
default = ["manager-cacache", "url-standard"]
6464
manager-cacache = ["http-cache/manager-cacache"]
6565
manager-moka = ["http-cache/manager-moka"]
6666
manager-foyer = ["http-cache/manager-foyer"]
6767
streaming = ["http-cache/streaming-tokio", "reqwest/stream", "futures-util"]
6868
rate-limiting = ["http-cache/rate-limiting"]
69+
url-standard = ["http-cache/url-standard"]
6970
url-ada = ["http-cache/url-ada"]
7071
http-headers-compat = ["http-cache/http-headers-compat"]
7172
manager-cacache-bincode = ["http-cache/manager-cacache-bincode"]

http-cache-surf/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ http = "1.2.0"
2121
http-cache-semantics = "2.1.0"
2222
http-types = "2.12.0"
2323
surf = { version = "2.3.2", default-features = false }
24-
url = { version = "2.5.4", features = ["serde"] }
2524

2625
[dependencies.http-cache]
2726
path = "../http-cache"
@@ -42,11 +41,13 @@ name = "surf_basic"
4241
required-features = ["manager-cacache"]
4342

4443
[features]
45-
default = ["manager-cacache"]
44+
default = ["manager-cacache", "url-standard"]
4645
manager-cacache = ["http-cache/manager-cacache"]
4746
manager-moka = ["http-cache/manager-moka"]
4847
manager-foyer = ["http-cache/manager-foyer"]
4948
rate-limiting = ["http-cache/rate-limiting"]
49+
url-standard = ["http-cache/url-standard"]
50+
url-ada = ["http-cache/url-ada"]
5051
http-headers-compat = ["http-cache/http-headers-compat"]
5152
manager-cacache-bincode = ["http-cache/manager-cacache-bincode"]
5253
manager-moka-bincode = ["http-cache/manager-moka-bincode"]

0 commit comments

Comments
 (0)