Skip to content

Commit 0ad2273

Browse files
committed
move id_from_cookie_value back to Session
1 parent b67598e commit 0ad2273

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
unused_qualifications
2626
)]
2727

28-
use async_session::{async_trait, id_from_cookie_value, serde_json, Result, Session, SessionStore};
28+
use async_session::{async_trait, serde_json, Result, Session, SessionStore};
2929
use redis::{aio::Connection, AsyncCommands, Client, IntoConnectionInfo, RedisResult};
3030

3131
/// # RedisSessionStore
@@ -116,7 +116,7 @@ impl RedisSessionStore {
116116
#[async_trait]
117117
impl SessionStore for RedisSessionStore {
118118
async fn load_session(&self, cookie_value: String) -> Option<Session> {
119-
let id = id_from_cookie_value(&cookie_value).ok()?;
119+
let id = Session::id_from_cookie_value(&cookie_value).ok()?;
120120
let mut connection = self.connection().await.ok()?;
121121
let record: Option<String> = connection.get(self.prefix_key(id)).await.ok()?;
122122
match record {

0 commit comments

Comments
 (0)