Skip to content

Commit

Permalink
mark v0.10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcountryman committed Feb 24, 2024
1 parent 5b38744 commit a2f2423
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Unreleased

# 0.10.4

- Revert introduction of lifetime parameter; use static life directly

This ensures that the changes introduced in `0.10.3` no not break SemVer.

Please note that `0.10.3` has been yanked in accordance with cargo guidelines.

# 0.10.3

- Improve session config allocation footprint #158
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = [".", "memory-store", "tower-sessions-core"]
resolver = "2"

[workspace.package]
version = "0.10.3"
version = "0.10.4"
edition = "2021"
authors = ["Max Countryman <[email protected]>"]
license = "MIT"
Expand Down Expand Up @@ -38,10 +38,10 @@ axum-core = ["tower-sessions-core/axum-core"]
memory-store = ["tower-sessions-memory-store"]

[workspace.dependencies]
tower-sessions = { version = "=0.10.3", path = ".", default-features = false }
tower-sessions = { version = "=0.10.4", path = ".", default-features = false }

tower-sessions-core = { version = "=0.10.3", path = "tower-sessions-core", default-features = false }
tower-sessions-memory-store = { version = "=0.10.3", path = "memory-store" }
tower-sessions-core = { version = "=0.10.4", path = "tower-sessions-core", default-features = false }
tower-sessions-memory-store = { version = "=0.10.4", path = "memory-store" }

async-trait = "0.1.74"
parking_lot = { version = "0.12.1", features = ["serde"] }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ To use the crate in your project, add the following to your `Cargo.toml` file:

```toml
[dependencies]
tower-sessions = "0.10.3"
tower-sessions = "0.10.4"
```

## 🤸 Usage
Expand Down
10 changes: 5 additions & 5 deletions src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ impl<'a> Default for SessionConfig<'a> {

/// A middleware that provides [`Session`] as a request extension.
#[derive(Debug, Clone)]
pub struct SessionManager<'a, S, Store: SessionStore> {
pub struct SessionManager<S, Store: SessionStore> {
inner: S,
session_store: Arc<Store>,
session_config: SessionConfig<'a>,
session_config: SessionConfig<'static>,
}

impl<'a, S, Store: SessionStore> SessionManager<'a, S, Store> {
impl<S, Store: SessionStore> SessionManager<S, Store> {
/// Create a new [`SessionManager`].
pub fn new(inner: S, session_store: Store) -> Self {
Self {
Expand All @@ -84,7 +84,7 @@ impl<'a, S, Store: SessionStore> SessionManager<'a, S, Store> {
}

impl<ReqBody, ResBody, S, Store: SessionStore> Service<Request<ReqBody>>
for SessionManager<'static, S, Store>
for SessionManager<S, Store>
where
S: Service<Request<ReqBody>, Response = Response<ResBody>> + Clone + Send + 'static,
S::Future: Send,
Expand Down Expand Up @@ -352,7 +352,7 @@ impl<Store: SessionStore> SessionManagerLayer<Store> {
}

impl<S, Store: SessionStore> Layer<S> for SessionManagerLayer<Store> {
type Service = CookieManager<SessionManager<'static, S, Store>>;
type Service = CookieManager<SessionManager<S, Store>>;

fn layer(&self, inner: S) -> Self::Service {
let session_manager = SessionManager {
Expand Down

0 comments on commit a2f2423

Please sign in to comment.