Use smol async-runtime and require one of the supported runtime for integration tests
This commit is contained in:
parent
2cfaa34a33
commit
09c328bb0d
26
.github/workflows/rust.yml
vendored
26
.github/workflows/rust.yml
vendored
@ -13,9 +13,6 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
name: Unit Test
|
name: Unit Test
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
runtime: [async-std-native-tls, async-std-rustls, actix-native-tls, actix-rustls, tokio-native-tls, tokio-rustls]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
@ -25,13 +22,14 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: >
|
args: >
|
||||||
--all
|
--all
|
||||||
--exclude 'sea-orm-example-*'
|
--exclude 'sea-orm-example-*'
|
||||||
--features default,runtime-${{ matrix.runtime }}
|
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
@ -39,7 +37,6 @@ jobs:
|
|||||||
args: >
|
args: >
|
||||||
--all
|
--all
|
||||||
--exclude 'sea-orm-example-*'
|
--exclude 'sea-orm-example-*'
|
||||||
--features default,runtime-${{ matrix.runtime }}
|
|
||||||
|
|
||||||
cli:
|
cli:
|
||||||
name: CLI
|
name: CLI
|
||||||
@ -56,6 +53,8 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: install
|
command: install
|
||||||
@ -69,8 +68,7 @@ jobs:
|
|||||||
DATABASE_URL: "sqlite::memory:"
|
DATABASE_URL: "sqlite::memory:"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# runtime: [async-std-native-tls, async-std-rustls, actix-native-tls, actix-rustls, tokio-native-tls, tokio-rustls]
|
runtime: [async-std-native-tls, actix-native-tls, tokio-native-tls]
|
||||||
runtime: [async-std-native-tls]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
@ -80,6 +78,8 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
@ -100,7 +100,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
version: [8.0, 5.7]
|
version: [8.0, 5.7]
|
||||||
runtime: [async-std-native-tls]
|
runtime: [async-std-native-tls, actix-native-tls, tokio-native-tls]
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:${{ matrix.version }}
|
image: mysql:${{ matrix.version }}
|
||||||
@ -127,6 +127,8 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
@ -147,7 +149,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
version: [10.6]
|
version: [10.6]
|
||||||
runtime: [async-std-native-tls]
|
runtime: [async-std-native-tls, actix-native-tls, tokio-native-tls]
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mariadb:${{ matrix.version }}
|
image: mariadb:${{ matrix.version }}
|
||||||
@ -174,6 +176,8 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
@ -194,7 +198,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
version: [13.3, 12.7, 11.12, 10.17, 9.6.22]
|
version: [13.3, 12.7, 11.12, 10.17, 9.6.22]
|
||||||
runtime: [async-std-native-tls]
|
runtime: [async-std-native-tls, actix-native-tls, tokio-native-tls]
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:${{ matrix.version }}
|
image: postgres:${{ matrix.version }}
|
||||||
@ -218,6 +222,8 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
|
@ -43,6 +43,8 @@ serde_json = { version = "^1", optional = true }
|
|||||||
uuid = { version = "0.8", features = ["serde", "v4"], optional = true }
|
uuid = { version = "0.8", features = ["serde", "v4"], optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
smol = { version = "^1.2" }
|
||||||
|
smol-potat = { version = "^1.1" }
|
||||||
async-std = { version = "^1.9", features = ["attributes"] }
|
async-std = { version = "^1.9", features = ["attributes"] }
|
||||||
tokio = { version = "^1.6", features = ["full"] }
|
tokio = { version = "^1.6", features = ["full"] }
|
||||||
actix-rt = { version = "2.2.0" }
|
actix-rt = { version = "2.2.0" }
|
||||||
|
@ -99,7 +99,7 @@ pub fn test(_: TokenStream, input: TokenStream) -> TokenStream {
|
|||||||
#[test]
|
#[test]
|
||||||
#(#attrs)*
|
#(#attrs)*
|
||||||
fn #name() #ret {
|
fn #name() #ret {
|
||||||
::sea_orm::block_on!(async { #body })
|
crate::block_on!(async { #body })
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.into()
|
.into()
|
||||||
|
@ -107,7 +107,7 @@ pub trait EntityTrait: EntityName {
|
|||||||
/// #
|
/// #
|
||||||
/// use sea_orm::{entity::*, query::*, tests_cfg::cake};
|
/// use sea_orm::{entity::*, query::*, tests_cfg::cake};
|
||||||
///
|
///
|
||||||
/// # let _: Result<(), DbErr> = sea_orm::block_on!(async {
|
/// # let _: Result<(), DbErr> = smol::block_on(async {
|
||||||
/// #
|
/// #
|
||||||
/// assert_eq!(
|
/// assert_eq!(
|
||||||
/// cake::Entity::find().one(&db).await?,
|
/// cake::Entity::find().one(&db).await?,
|
||||||
@ -170,7 +170,7 @@ pub trait EntityTrait: EntityName {
|
|||||||
/// #
|
/// #
|
||||||
/// use sea_orm::{entity::*, query::*, tests_cfg::cake};
|
/// use sea_orm::{entity::*, query::*, tests_cfg::cake};
|
||||||
///
|
///
|
||||||
/// # let _: Result<(), DbErr> = sea_orm::block_on!(async {
|
/// # let _: Result<(), DbErr> = smol::block_on(async {
|
||||||
/// #
|
/// #
|
||||||
/// assert_eq!(
|
/// assert_eq!(
|
||||||
/// cake::Entity::find_by_id(11).all(&db).await?,
|
/// cake::Entity::find_by_id(11).all(&db).await?,
|
||||||
@ -207,7 +207,7 @@ pub trait EntityTrait: EntityName {
|
|||||||
/// #
|
/// #
|
||||||
/// use sea_orm::{entity::*, query::*, tests_cfg::cake_filling};
|
/// use sea_orm::{entity::*, query::*, tests_cfg::cake_filling};
|
||||||
///
|
///
|
||||||
/// # let _: Result<(), DbErr> = sea_orm::block_on!(async {
|
/// # let _: Result<(), DbErr> = smol::block_on(async {
|
||||||
/// #
|
/// #
|
||||||
/// assert_eq!(
|
/// assert_eq!(
|
||||||
/// cake_filling::Entity::find_by_id((2, 3)).all(&db).await?,
|
/// cake_filling::Entity::find_by_id((2, 3)).all(&db).await?,
|
||||||
@ -275,7 +275,7 @@ pub trait EntityTrait: EntityName {
|
|||||||
/// ..Default::default()
|
/// ..Default::default()
|
||||||
/// };
|
/// };
|
||||||
///
|
///
|
||||||
/// # let _: Result<(), DbErr> = sea_orm::block_on!(async {
|
/// # let _: Result<(), DbErr> = smol::block_on(async {
|
||||||
/// #
|
/// #
|
||||||
/// let insert_result = cake::Entity::insert(apple).exec(&db).await?;
|
/// let insert_result = cake::Entity::insert(apple).exec(&db).await?;
|
||||||
///
|
///
|
||||||
@ -326,7 +326,7 @@ pub trait EntityTrait: EntityName {
|
|||||||
/// ..Default::default()
|
/// ..Default::default()
|
||||||
/// };
|
/// };
|
||||||
///
|
///
|
||||||
/// # let _: Result<(), DbErr> = sea_orm::block_on!(async {
|
/// # let _: Result<(), DbErr> = smol::block_on(async {
|
||||||
/// #
|
/// #
|
||||||
/// let insert_result = cake::Entity::insert_many(vec![apple, orange]).exec(&db).await?;
|
/// let insert_result = cake::Entity::insert_many(vec![apple, orange]).exec(&db).await?;
|
||||||
///
|
///
|
||||||
@ -378,7 +378,7 @@ pub trait EntityTrait: EntityName {
|
|||||||
/// ..Default::default()
|
/// ..Default::default()
|
||||||
/// };
|
/// };
|
||||||
///
|
///
|
||||||
/// # let _: Result<(), DbErr> = sea_orm::block_on!(async {
|
/// # let _: Result<(), DbErr> = smol::block_on(async {
|
||||||
/// #
|
/// #
|
||||||
/// assert_eq!(
|
/// assert_eq!(
|
||||||
/// fruit::Entity::update(orange.clone()).exec(&db).await?, // Clone here because we need to assert_eq
|
/// fruit::Entity::update(orange.clone()).exec(&db).await?, // Clone here because we need to assert_eq
|
||||||
@ -422,7 +422,7 @@ pub trait EntityTrait: EntityName {
|
|||||||
/// #
|
/// #
|
||||||
/// use sea_orm::{entity::*, query::*, tests_cfg::fruit, sea_query::{Expr, Value}};
|
/// use sea_orm::{entity::*, query::*, tests_cfg::fruit, sea_query::{Expr, Value}};
|
||||||
///
|
///
|
||||||
/// # let _: Result<(), DbErr> = sea_orm::block_on!(async {
|
/// # let _: Result<(), DbErr> = smol::block_on(async {
|
||||||
/// #
|
/// #
|
||||||
/// let update_result = fruit::Entity::update_many()
|
/// let update_result = fruit::Entity::update_many()
|
||||||
/// .col_expr(fruit::Column::CakeId, Expr::value(Value::Null))
|
/// .col_expr(fruit::Column::CakeId, Expr::value(Value::Null))
|
||||||
@ -471,7 +471,7 @@ pub trait EntityTrait: EntityName {
|
|||||||
/// ..Default::default()
|
/// ..Default::default()
|
||||||
/// };
|
/// };
|
||||||
///
|
///
|
||||||
/// # let _: Result<(), DbErr> = sea_orm::block_on!(async {
|
/// # let _: Result<(), DbErr> = smol::block_on(async {
|
||||||
/// #
|
/// #
|
||||||
/// let delete_result = fruit::Entity::delete(orange).exec(&db).await?;
|
/// let delete_result = fruit::Entity::delete(orange).exec(&db).await?;
|
||||||
///
|
///
|
||||||
@ -514,7 +514,7 @@ pub trait EntityTrait: EntityName {
|
|||||||
/// #
|
/// #
|
||||||
/// use sea_orm::{entity::*, query::*, tests_cfg::fruit};
|
/// use sea_orm::{entity::*, query::*, tests_cfg::fruit};
|
||||||
///
|
///
|
||||||
/// # let _: Result<(), DbErr> = sea_orm::block_on!(async {
|
/// # let _: Result<(), DbErr> = smol::block_on(async {
|
||||||
/// #
|
/// #
|
||||||
/// let delete_result = fruit::Entity::delete_many()
|
/// let delete_result = fruit::Entity::delete_many()
|
||||||
/// .filter(fruit::Column::Name.contains("Apple"))
|
/// .filter(fruit::Column::Name.contains("Apple"))
|
||||||
|
@ -97,7 +97,7 @@ where
|
|||||||
/// # use sea_orm::{error::*, MockDatabase, DbBackend};
|
/// # use sea_orm::{error::*, MockDatabase, DbBackend};
|
||||||
/// # let owned_db = MockDatabase::new(DbBackend::Postgres).into_connection();
|
/// # let owned_db = MockDatabase::new(DbBackend::Postgres).into_connection();
|
||||||
/// # let db = &owned_db;
|
/// # let db = &owned_db;
|
||||||
/// # let _: Result<(), DbErr> = sea_orm::block_on!(async {
|
/// # let _: Result<(), DbErr> = smol::block_on(async {
|
||||||
/// #
|
/// #
|
||||||
/// use sea_orm::{entity::*, query::*, tests_cfg::cake};
|
/// use sea_orm::{entity::*, query::*, tests_cfg::cake};
|
||||||
/// let mut cake_pages = cake::Entity::find()
|
/// let mut cake_pages = cake::Entity::find()
|
||||||
@ -125,7 +125,7 @@ where
|
|||||||
/// # use sea_orm::{error::*, MockDatabase, DbBackend};
|
/// # use sea_orm::{error::*, MockDatabase, DbBackend};
|
||||||
/// # let owned_db = MockDatabase::new(DbBackend::Postgres).into_connection();
|
/// # let owned_db = MockDatabase::new(DbBackend::Postgres).into_connection();
|
||||||
/// # let db = &owned_db;
|
/// # let db = &owned_db;
|
||||||
/// # let _: Result<(), DbErr> = sea_orm::block_on!(async {
|
/// # let _: Result<(), DbErr> = smol::block_on(async {
|
||||||
/// #
|
/// #
|
||||||
/// use futures::TryStreamExt;
|
/// use futures::TryStreamExt;
|
||||||
/// use sea_orm::{entity::*, query::*, tests_cfg::cake};
|
/// use sea_orm::{entity::*, query::*, tests_cfg::cake};
|
||||||
@ -203,7 +203,7 @@ mod tests {
|
|||||||
(db, num_items)
|
(db, num_items)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[sea_orm_macros::test]
|
#[smol_potat::test]
|
||||||
async fn fetch_page() -> Result<(), DbErr> {
|
async fn fetch_page() -> Result<(), DbErr> {
|
||||||
let (db, pages) = setup();
|
let (db, pages) = setup();
|
||||||
|
|
||||||
@ -233,7 +233,7 @@ mod tests {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[sea_orm_macros::test]
|
#[smol_potat::test]
|
||||||
async fn fetch() -> Result<(), DbErr> {
|
async fn fetch() -> Result<(), DbErr> {
|
||||||
let (db, pages) = setup();
|
let (db, pages) = setup();
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ mod tests {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[sea_orm_macros::test]
|
#[smol_potat::test]
|
||||||
async fn num_pages() -> Result<(), DbErr> {
|
async fn num_pages() -> Result<(), DbErr> {
|
||||||
let (db, num_items) = setup_num_items();
|
let (db, num_items) = setup_num_items();
|
||||||
|
|
||||||
@ -299,7 +299,7 @@ mod tests {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[sea_orm_macros::test]
|
#[smol_potat::test]
|
||||||
async fn next_and_cur_page() -> Result<(), DbErr> {
|
async fn next_and_cur_page() -> Result<(), DbErr> {
|
||||||
let (db, _) = setup();
|
let (db, _) = setup();
|
||||||
|
|
||||||
@ -315,7 +315,7 @@ mod tests {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[sea_orm_macros::test]
|
#[smol_potat::test]
|
||||||
async fn fetch_and_next() -> Result<(), DbErr> {
|
async fn fetch_and_next() -> Result<(), DbErr> {
|
||||||
let (db, pages) = setup();
|
let (db, pages) = setup();
|
||||||
|
|
||||||
@ -350,7 +350,7 @@ mod tests {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[sea_orm_macros::test]
|
#[smol_potat::test]
|
||||||
async fn into_stream() -> Result<(), DbErr> {
|
async fn into_stream() -> Result<(), DbErr> {
|
||||||
let (db, pages) = setup();
|
let (db, pages) = setup();
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ where
|
|||||||
/// num_of_cakes: i32,
|
/// num_of_cakes: i32,
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// # let _: Result<(), DbErr> = sea_orm::block_on!(async {
|
/// # let _: Result<(), DbErr> = smol::block_on(async {
|
||||||
/// #
|
/// #
|
||||||
/// let res: Vec<SelectResult> = cake::Entity::find().from_raw_sql(
|
/// let res: Vec<SelectResult> = cake::Entity::find().from_raw_sql(
|
||||||
/// Statement::from_sql_and_values(
|
/// Statement::from_sql_and_values(
|
||||||
@ -352,7 +352,7 @@ where
|
|||||||
/// #
|
/// #
|
||||||
/// use sea_orm::{entity::*, query::*, tests_cfg::cake};
|
/// use sea_orm::{entity::*, query::*, tests_cfg::cake};
|
||||||
///
|
///
|
||||||
/// # let _: Result<(), DbErr> = sea_orm::block_on!(async {
|
/// # let _: Result<(), DbErr> = smol::block_on(async {
|
||||||
/// #
|
/// #
|
||||||
/// let res: Vec<serde_json::Value> = cake::Entity::find().from_raw_sql(
|
/// let res: Vec<serde_json::Value> = cake::Entity::find().from_raw_sql(
|
||||||
/// Statement::from_sql_and_values(
|
/// Statement::from_sql_and_values(
|
||||||
@ -404,7 +404,7 @@ where
|
|||||||
/// #
|
/// #
|
||||||
/// use sea_orm::{entity::*, query::*, tests_cfg::cake};
|
/// use sea_orm::{entity::*, query::*, tests_cfg::cake};
|
||||||
///
|
///
|
||||||
/// # let _: Result<(), DbErr> = sea_orm::block_on!(async {
|
/// # let _: Result<(), DbErr> = smol::block_on(async {
|
||||||
/// #
|
/// #
|
||||||
/// let _: Option<cake::Model> = cake::Entity::find().from_raw_sql(
|
/// let _: Option<cake::Model> = cake::Entity::find().from_raw_sql(
|
||||||
/// Statement::from_sql_and_values(
|
/// Statement::from_sql_and_values(
|
||||||
@ -439,7 +439,7 @@ where
|
|||||||
/// #
|
/// #
|
||||||
/// use sea_orm::{entity::*, query::*, tests_cfg::cake};
|
/// use sea_orm::{entity::*, query::*, tests_cfg::cake};
|
||||||
///
|
///
|
||||||
/// # let _: Result<(), DbErr> = sea_orm::block_on!(async {
|
/// # let _: Result<(), DbErr> = smol::block_on(async {
|
||||||
/// #
|
/// #
|
||||||
/// let _: Vec<cake::Model> = cake::Entity::find().from_raw_sql(
|
/// let _: Vec<cake::Model> = cake::Entity::find().from_raw_sql(
|
||||||
/// Statement::from_sql_and_values(
|
/// Statement::from_sql_and_values(
|
||||||
|
@ -207,8 +207,6 @@ pub mod error;
|
|||||||
mod executor;
|
mod executor;
|
||||||
pub mod query;
|
pub mod query;
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub mod runtime;
|
|
||||||
#[doc(hidden)]
|
|
||||||
pub mod tests_cfg;
|
pub mod tests_cfg;
|
||||||
mod util;
|
mod util;
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ mod tests {
|
|||||||
use crate::{entity::*, DbBackend, DbErr, MockDatabase};
|
use crate::{entity::*, DbBackend, DbErr, MockDatabase};
|
||||||
use sea_query::Value;
|
use sea_query::Value;
|
||||||
|
|
||||||
#[sea_orm_macros::test]
|
#[smol_potat::test]
|
||||||
async fn to_json_1() -> Result<(), DbErr> {
|
async fn to_json_1() -> Result<(), DbErr> {
|
||||||
let db = MockDatabase::new(DbBackend::Postgres)
|
let db = MockDatabase::new(DbBackend::Postgres)
|
||||||
.append_query_results(vec![vec![maplit::btreemap! {
|
.append_query_results(vec![vec![maplit::btreemap! {
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
pub mod common;
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use sea_orm::{entity::*, error::*, sea_query, tests_cfg::*, Database, DbConn};
|
use sea_orm::{entity::*, error::*, sea_query, tests_cfg::*, Database, DbConn};
|
||||||
|
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
pub mod setup;
|
|
||||||
use sea_orm::DatabaseConnection;
|
|
||||||
pub mod bakery_chain;
|
pub mod bakery_chain;
|
||||||
|
pub mod runtime;
|
||||||
|
pub mod setup;
|
||||||
|
|
||||||
pub use bakery_chain::*;
|
pub use bakery_chain::*;
|
||||||
|
use sea_orm::DatabaseConnection;
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
pub struct TestContext {
|
pub struct TestContext {
|
||||||
|
@ -1,11 +1,4 @@
|
|||||||
#[cfg(any(
|
#[cfg(feature = "runtime-async-std")]
|
||||||
feature = "runtime-async-std",
|
|
||||||
all(
|
|
||||||
not(feature = "runtime-async-std"),
|
|
||||||
not(feature = "runtime-actix"),
|
|
||||||
not(feature = "runtime-tokio"),
|
|
||||||
),
|
|
||||||
))]
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! block_on {
|
macro_rules! block_on {
|
||||||
($($expr:tt)*) => {
|
($($expr:tt)*) => {
|
Loading…
x
Reference in New Issue
Block a user