Skip to content

Commit

Permalink
rename deletion task flag before release
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcountryman committed Oct 31, 2023
1 parent d9c5dab commit 95b4173
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
20 changes: 6 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ readme = "README.md"
rust-version = "1.67.1"

[features]
deletion-task = ["tokio-rt", "tokio-time"]
default = ["axum-core", "memory-store"]
tokio-rt = ["tokio/rt"]
tokio-time = ["tokio/time"]
continuously-delete-expired = ["tokio-rt", "tokio-time"]
memory-store = []

moka-store = ["moka"]
Expand Down Expand Up @@ -88,36 +88,28 @@ required-features = ["axum-core", "redis-store"]

[[example]]
name = "mongodb-store"
required-features = [
"axum-core",
"mongodb-store",
"continuously-delete-expired",
]
required-features = ["axum-core", "mongodb-store", "deletion-task"]

[[example]]
name = "sqlite-store"
required-features = ["axum-core", "sqlite-store", "continuously-delete-expired"]
required-features = ["axum-core", "sqlite-store", "deletion-task"]

[[example]]
name = "postgres-store"
required-features = [
"axum-core",
"postgres-store",
"continuously-delete-expired",
]
required-features = ["axum-core", "postgres-store", "deletion-task"]

[[example]]
name = "moka-postgres-store"
required-features = [
"axum-core",
"postgres-store",
"moka-store",
"continuously-delete-expired",
"deletion-task",
]

[[example]]
name = "mysql-store"
required-features = ["axum-core", "mysql-store", "continuously-delete-expired"]
required-features = ["axum-core", "mysql-store", "deletion-task"]

[[example]]
name = "strongly-typed"
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
//! the removal of expired sessions, maintaining your application's data
//! integrity and performance.
//! ```rust,no_run
//! # #[cfg(all(feature = "sqlite-store", feature = "continuously-delete-expired"))] {
//! # #[cfg(all(feature = "sqlite-store", feature = "deletion-task"))] {
//! # use tower_sessions::{sqlx::SqlitePool, SqliteStore, session_store::ExpiredDeletion};
//! # tokio_test::block_on(async {
//! let pool = SqlitePool::connect("sqlite::memory:").await.unwrap();
Expand Down
6 changes: 3 additions & 3 deletions src/session_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ pub trait ExpiredDeletion: SessionStore {
/// ```rust,no_run
/// use tower_sessions::{session_store::ExpiredDeletion, sqlx::SqlitePool, SqliteStore};
///
/// # #[cfg(all(feature = "sqlite-store", feature = "continuously-delete-expired"))]
/// # #[cfg(all(feature = "sqlite-store", feature = "deletion-task"))]
/// # {
/// # tokio_test::block_on(async {
/// let pool = SqlitePool::connect("sqlite::memory:").await.unwrap();
Expand All @@ -173,8 +173,8 @@ pub trait ExpiredDeletion: SessionStore {
/// # })
/// # }
/// ```
#[cfg(feature = "continuously-delete-expired")]
#[cfg_attr(docsrs, doc(cfg(feature = "continuously-delete-expired")))]
#[cfg(feature = "deletion-task")]
#[cfg_attr(docsrs, doc(cfg(feature = "deletion-task")))]
async fn continuously_delete_expired(
self,
period: tokio::time::Duration,
Expand Down

0 comments on commit 95b4173

Please sign in to comment.