Skip to content

Commit d8017cc

Browse files
committed
use Session::id_from_cookie_value
1 parent d5337c7 commit d8017cc

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
@@ -1,4 +1,4 @@
1-
use async_session::{async_trait, base64, serde_json, utils, Session, SessionStore};
1+
use async_session::{async_trait, base64, serde_json, Session, SessionStore};
22
use redis::{AsyncCommands, Client, RedisError};
33
use std::time::Duration;
44

@@ -50,7 +50,7 @@ impl SessionStore for RedisSessionStore {
5050
type Error = Error;
5151

5252
async fn load_session(&self, cookie_value: String) -> Option<Session> {
53-
let id = utils::id_from_string(&cookie_value).ok()?;
53+
let id = Session::id_from_cookie_value(&cookie_value).ok()?;
5454
let mut connection = self.connection().await.ok()?;
5555
match connection.get::<_, Option<String>>(id).await.ok()? {
5656
Some(value) => serde_json::from_str(&value).ok()?,

0 commit comments

Comments
 (0)