Skip to content

Commit 3f74ee4

Browse files
committed
conditionally apply async dispatcher macros for testing
1 parent d9db906 commit 3f74ee4

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.github/workflows/main-ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions-rs/cargo@v1
3030
with:
3131
command: clippy
32-
args: --all --all-targets --no-default-features --features async-std-runtime,all-transport -- --deny warnings
32+
args: --all --all-targets --no-default-features --features async-std-runtime,all-transport,async-dispatcher-macros -- --deny warnings
3333

3434
test:
3535
name: Test
@@ -63,7 +63,7 @@ jobs:
6363
uses: actions-rs/cargo@v1
6464
with:
6565
command: test
66-
args: --all --no-default-features --features async-dispatcher-runtime,all-transport
66+
args: --all --no-default-features --features async-dispatcher-runtime,all-transport,async-dispatcher-macros
6767

6868
fmt:
6969
name: Formatting

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ default = ["tokio-runtime", "all-transport"]
1313
tokio-runtime = ["tokio", "tokio-util"]
1414
async-std-runtime = ["async-std"]
1515
async-dispatcher-runtime = ["async-std", "async-dispatcher"]
16+
async-dispatcher-macros = ["async-dispatcher/macros"]
1617
all-transport = ["ipc-transport", "tcp-transport"]
1718
ipc-transport = []
1819
tcp-transport = []

src/async_rt/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@ extern crate async_std;
1212
#[cfg(feature = "async-std-runtime")]
1313
pub use async_std::{main, test};
1414

15-
#[cfg(feature = "async-dispatcher-runtime")]
15+
#[cfg(all(
16+
feature = "async-dispatcher-runtime",
17+
feature = "async-dispatcher-macros"
18+
))]
1619
pub use async_dispatcher::{main, test};

0 commit comments

Comments
 (0)