Skip to content

Commit c45c113

Browse files
committed
Minor improvements
Signed-off-by: Aaron Erhardt <[email protected]>
1 parent 398ca9f commit c45c113

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ impl MongodbSessionStore {
8888
/// # Ok(()) }) }
8989
/// ```
9090
pub async fn initialize(&self) -> Result {
91-
self.index_on_expiry_at().await?;
92-
Ok(())
91+
self.index_on_expiry_at().await
9392
}
9493

9594
/// private associated function
@@ -147,7 +146,6 @@ impl SessionStore for MongodbSessionStore {
147146
let query = doc! { "session_id": id };
148147
let expire_at = match session.expiry() {
149148
None => Utc::now() + Duration::from_std(std::time::Duration::from_secs(1200)).unwrap(),
150-
151149
Some(expiry) => *{ expiry },
152150
};
153151
let replacement = doc! { "session_id": id, "session": value, "expireAt": expire_at, "created": Utc::now() };

0 commit comments

Comments
 (0)