@@ -16,7 +16,7 @@ use std::time::Duration;
16
16
/// store.migrate().await?;
17
17
/// store.spawn_cleanup_task(Duration::from_secs(60 * 60));
18
18
///
19
- /// let session = Session::new();
19
+ /// let mut session = Session::new();
20
20
/// session.insert("key", vec![1,2,3]);
21
21
///
22
22
/// let cookie_value = store.store_session(session).await.unwrap();
@@ -358,7 +358,7 @@ mod tests {
358
358
#[ async_std:: test]
359
359
async fn creating_a_new_session_with_no_expiry ( ) -> Result {
360
360
let store = test_store ( ) . await ;
361
- let session = Session :: new ( ) ;
361
+ let mut session = Session :: new ( ) ;
362
362
session. insert ( "key" , "value" ) ?;
363
363
let cloned = session. clone ( ) ;
364
364
let cookie_value = store. store_session ( session) . await . unwrap ( ) ;
@@ -387,13 +387,13 @@ mod tests {
387
387
#[ async_std:: test]
388
388
async fn updating_a_session ( ) -> Result {
389
389
let store = test_store ( ) . await ;
390
- let session = Session :: new ( ) ;
390
+ let mut session = Session :: new ( ) ;
391
391
let original_id = session. id ( ) . to_owned ( ) ;
392
392
393
393
session. insert ( "key" , "value" ) ?;
394
394
let cookie_value = store. store_session ( session) . await . unwrap ( ) ;
395
395
396
- let session = store. load_session ( cookie_value. clone ( ) ) . await . unwrap ( ) ;
396
+ let mut session = store. load_session ( cookie_value. clone ( ) ) . await . unwrap ( ) ;
397
397
session. insert ( "key" , "other value" ) ?;
398
398
assert_eq ! ( None , store. store_session( session) . await ) ;
399
399
0 commit comments