Skip to content

Commit a4378b2

Browse files
committed
Check correctness with no or individual features
Signed-off-by: itowlson <[email protected]>
1 parent 1d7c700 commit a4378b2

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ jobs:
3535
cargo fmt --all -- --check
3636
cargo clippy --workspace --all-targets -- -D warnings
3737
38+
- name: Check with no-default-features
39+
shell: bash
40+
run: cargo check --no-default-features
41+
42+
- name: Check with `json` feature only
43+
shell: bash
44+
run: cargo check --no-default-features --features json
45+
46+
- name: Check with `postgres4-types` feature only
47+
shell: bash
48+
run: cargo check --no-default-features --features postgres4-types
49+
3850
- name: Test
3951
shell: bash
4052
run: cargo test --workspace

src/http/conversions.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ use async_trait::async_trait;
55
use wasi::io::streams;
66

77
use super::{
8-
Headers, IncomingRequest, IncomingResponse, Json, JsonBodyError, Method, OutgoingRequest,
9-
OutgoingResponse, RequestBuilder,
8+
Headers, IncomingRequest, IncomingResponse, Method, OutgoingRequest, OutgoingResponse,
9+
RequestBuilder,
1010
};
11+
#[cfg(feature = "json")]
12+
use super::{Json, JsonBodyError};
1113

1214
use super::{responses, NonUtf8BodyError, Request, Response};
1315

0 commit comments

Comments
 (0)