Skip to content

Commit

Permalink
provide tokio-rt feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcountryman committed Oct 10, 2023
1 parent c44b9c6 commit 965a861
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Cargo.toml
Expand Up @@ -23,6 +23,7 @@ sqlite-store = ["sqlx/sqlite", "sqlx-store"]
postgres-store = ["sqlx/postgres", "sqlx-store"]
mysql-store = ["sqlx/mysql", "sqlx-store"]
moka-store = ["moka"]
tokio-rt = ["tokio/rt"]

[dependencies]
async-trait = "0.1.73"
Expand All @@ -35,7 +36,7 @@ serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"
thiserror = "1.0.49"
time = { version = "0.3.29", features = ["serde"] }
tokio = { version = "1.32.0", features = ["sync", "rt"] }
tokio = { version = "1.32.0", features = ["sync"] }
tower-cookies = "0.9.0"
tower-layer = "0.3.2"
tower-service = "0.3.2"
Expand Down Expand Up @@ -78,23 +79,23 @@ required-features = ["axum-core", "redis-store"]

[[example]]
name = "mongodb-store"
required-features = ["axum-core", "mongodb-store"]
required-features = ["axum-core", "mongodb-store", "tokio-rt"]

[[example]]
name = "sqlite-store"
required-features = ["axum-core", "sqlite-store"]
required-features = ["axum-core", "sqlite-store", "tokio-rt"]

[[example]]
name = "postgres-store"
required-features = ["axum-core", "postgres-store"]
required-features = ["axum-core", "postgres-store", "tokio-rt"]

[[example]]
name = "moka-postgres-store"
required-features = ["axum-core", "postgres-store", "moka-store"]
required-features = ["axum-core", "postgres-store", "moka-store", "tokio-rt"]

[[example]]
name = "mysql-store"
required-features = ["axum-core", "mysql-store"]
required-features = ["axum-core", "mysql-store", "tokio-rt"]

[[example]]
name = "strongly-typed"
Expand Down
1 change: 1 addition & 0 deletions src/mongodb_store.rs
Expand Up @@ -94,6 +94,7 @@ impl MongoDBStore {
/// );
/// # })
/// ```
#[cfg(feature = "tokio-rt")]
pub async fn continuously_delete_expired(
self,
period: tokio::time::Duration,
Expand Down
1 change: 1 addition & 0 deletions src/sqlx_store/mysql_store.rs
Expand Up @@ -111,6 +111,7 @@ impl MySqlStore {
/// );
/// # })
/// ```
#[cfg(feature = "tokio-rt")]
pub async fn continuously_delete_expired(
self,
period: tokio::time::Duration,
Expand Down
1 change: 1 addition & 0 deletions src/sqlx_store/postgres_store.rs
Expand Up @@ -123,6 +123,7 @@ impl PostgresStore {
/// );
/// # })
/// ```
#[cfg(feature = "tokio-rt")]
pub async fn continuously_delete_expired(
self,
period: tokio::time::Duration,
Expand Down
1 change: 1 addition & 0 deletions src/sqlx_store/sqlite_store.rs
Expand Up @@ -109,6 +109,7 @@ impl SqliteStore {
/// );
/// # })
/// ```
#[cfg(feature = "tokio-rt")]
pub async fn continuously_delete_expired(
self,
period: tokio::time::Duration,
Expand Down

0 comments on commit 965a861

Please sign in to comment.