Skip to content

Commit

Permalink
conditionally apply async dispatcher macros for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
rgbkrk committed May 31, 2024
1 parent d9db906 commit 3f74ee4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --all-targets --no-default-features --features async-std-runtime,all-transport -- --deny warnings
args: --all --all-targets --no-default-features --features async-std-runtime,all-transport,async-dispatcher-macros -- --deny warnings

test:
name: Test
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
args: --all --no-default-features --features async-dispatcher-runtime,all-transport
args: --all --no-default-features --features async-dispatcher-runtime,all-transport,async-dispatcher-macros

fmt:
name: Formatting
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ default = ["tokio-runtime", "all-transport"]
tokio-runtime = ["tokio", "tokio-util"]
async-std-runtime = ["async-std"]
async-dispatcher-runtime = ["async-std", "async-dispatcher"]
async-dispatcher-macros = ["async-dispatcher/macros"]
all-transport = ["ipc-transport", "tcp-transport"]
ipc-transport = []
tcp-transport = []
Expand Down
5 changes: 4 additions & 1 deletion src/async_rt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ extern crate async_std;
#[cfg(feature = "async-std-runtime")]
pub use async_std::{main, test};

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

0 comments on commit 3f74ee4

Please sign in to comment.