@@ -403,12 +403,12 @@ impl Room {
403403/// sliding sync. 
404404#[ cfg( feature = "experimental-sliding-sync" ) ]  
405405    pub  fn  latest_event ( & self )  -> Option < LatestEvent >  { 
406-         self . inner . read ( ) . latest_event . clone ( ) 
406+         self . inner . read ( ) . latest_event . as_deref ( ) . cloned ( ) 
407407    } 
408408
409409    /// Update the last event in the room 
410410#[ cfg( all( feature = "e2e-encryption" ,  feature = "experimental-sliding-sync" ) ) ]  
411-     pub ( crate )  fn  set_latest_event ( & self ,  latest_event :  Option < LatestEvent > )  { 
411+     pub ( crate )  fn  set_latest_event ( & self ,  latest_event :  Option < Box < LatestEvent > > )  { 
412412        self . inner . update ( |info| info. latest_event  = latest_event) ; 
413413    } 
414414
@@ -429,7 +429,7 @@ impl Room {
429429/// Panics if index is not a valid index in the latest_encrypted_events 
430430/// list. 
431431#[ cfg( all( feature = "e2e-encryption" ,  feature = "experimental-sliding-sync" ) ) ]  
432-     pub ( crate )  fn  on_latest_event_decrypted ( & self ,  latest_event :  LatestEvent ,  index :  usize )  { 
432+     pub ( crate )  fn  on_latest_event_decrypted ( & self ,  latest_event :  Box < LatestEvent > ,  index :  usize )  { 
433433        self . set_latest_event ( Some ( latest_event) ) ; 
434434        self . latest_encrypted_events . write ( ) . unwrap ( ) . drain ( 0 ..=index) ; 
435435    } 
@@ -732,10 +732,10 @@ pub struct RoomInfo {
732732pub ( crate )  encryption_state_synced :  bool , 
733733    /// The last event send by sliding sync 
734734#[ cfg( feature = "experimental-sliding-sync" ) ]  
735-     pub ( crate )  latest_event :  Option < LatestEvent > , 
735+     pub ( crate )  latest_event :  Option < Box < LatestEvent > > , 
736736    /// Base room info which holds some basic event contents important for the 
737737/// room state. 
738- pub ( crate )  base_info :  BaseRoomInfo , 
738+ pub ( crate )  base_info :  Box < BaseRoomInfo > , 
739739} 
740740
741741#[ derive( Clone ,  Debug ,  Serialize ,  Deserialize ,  PartialEq ,  Eq ) ]  
@@ -769,7 +769,7 @@ impl RoomInfo {
769769            encryption_state_synced :  false , 
770770            #[ cfg( feature = "experimental-sliding-sync" ) ]  
771771            latest_event :  None , 
772-             base_info :  BaseRoomInfo :: new ( ) , 
772+             base_info :  Box :: new ( BaseRoomInfo :: new ( ) ) , 
773773        } 
774774    } 
775775
@@ -1246,10 +1246,10 @@ mod tests {
12461246            last_prev_batch :  Some ( "pb" . to_owned ( ) ) , 
12471247            sync_info :  SyncInfo :: FullySynced , 
12481248            encryption_state_synced :  true , 
1249-             latest_event :  Some ( LatestEvent :: new ( 
1249+             latest_event :  Some ( Box :: new ( LatestEvent :: new ( 
12501250                Raw :: from_json_string ( json ! ( { "sender" :  "@u:i.uk" } ) . to_string ( ) ) . unwrap ( ) . into ( ) , 
1251-             ) ) , 
1252-             base_info :  BaseRoomInfo :: new ( ) , 
1251+             ) ) ) , 
1252+             base_info :  Box :: new ( BaseRoomInfo :: new ( ) ) , 
12531253        } ; 
12541254
12551255        let  info_json = json ! ( { 
@@ -1698,10 +1698,10 @@ mod tests {
16981698    } 
16991699
17001700    #[ cfg( feature = "experimental-sliding-sync" ) ]  
1701-     fn  make_latest_event ( event_id :  & str )  -> LatestEvent  { 
1702-         LatestEvent :: new ( SyncTimelineEvent :: new ( 
1701+     fn  make_latest_event ( event_id :  & str )  -> Box < LatestEvent >  { 
1702+         Box :: new ( LatestEvent :: new ( SyncTimelineEvent :: new ( 
17031703            Raw :: from_json_string ( json ! ( {  "event_id" :  event_id } ) . to_string ( ) ) . unwrap ( ) , 
1704-         ) ) 
1704+         ) ) ) 
17051705    } 
17061706
17071707    fn  timestamp ( minutes_ago :  u32 )  -> MilliSecondsSinceUnixEpoch  { 
0 commit comments