@@ -2029,7 +2029,10 @@ impl Chat {
20292029 ON c.id=cc.contact_id \
20302030 WHERE cc.chat_id=? AND cc.add_timestamp >= cc.remove_timestamp",
20312031 ( self . id , ) ,
2032- |row| row. get :: < _ , String > ( 0 ) ,
2032+ |row| {
2033+ let addr: String = row. get ( 0 ) ?;
2034+ Ok ( addr)
2035+ } ,
20332036 )
20342037 . await ?;
20352038 self . sync ( context, SyncAction :: SetContacts ( addrs) ) . await ?;
@@ -3038,7 +3041,7 @@ pub async fn get_chat_msgs_ex(
30383041 ) )
30393042 }
30403043 } ;
3041- let process_rows = |rows : rusqlite:: MappedRows < _ > | {
3044+ let process_rows = |rows : rusqlite:: AndThenRows < _ > | {
30423045 // It is faster to sort here rather than
30433046 // let sqlite execute an ORDER BY clause.
30443047 let mut sorted_rows = Vec :: new ( ) ;
@@ -3120,7 +3123,10 @@ pub async fn marknoticed_chat(context: &Context, chat_id: ChatId) -> Result<()>
31203123 LEFT JOIN chats c ON m.chat_id=c.id
31213124 WHERE m.state=10 AND m.hidden=0 AND m.chat_id>9 AND c.archived=1" ,
31223125 ( ) ,
3123- |row| row. get :: < _ , ChatId > ( 0 ) ,
3126+ |row| {
3127+ let chat_id: ChatId = row. get ( 0 ) ?;
3128+ Ok ( chat_id)
3129+ } ,
31243130 )
31253131 . await ?;
31263132 if chat_ids_in_archive. is_empty ( ) {
@@ -3298,7 +3304,10 @@ pub async fn get_chat_media(
32983304 DC_CHAT_ID_TRASH ,
32993305 Viewtype :: Webxdc ,
33003306 ) ,
3301- |row| row. get :: < _ , MsgId > ( 0 ) ,
3307+ |row| {
3308+ let msg_id: MsgId = row. get ( 0 ) ?;
3309+ Ok ( msg_id)
3310+ } ,
33023311 )
33033312 . await ?
33043313 } else {
@@ -3328,7 +3337,10 @@ pub async fn get_chat_media(
33283337 msg_type
33293338 } ,
33303339 ) ,
3331- |row| row. get :: < _ , MsgId > ( 0 ) ,
3340+ |row| {
3341+ let msg_id: MsgId = row. get ( 0 ) ?;
3342+ Ok ( msg_id)
3343+ } ,
33323344 )
33333345 . await ?
33343346 } ;
@@ -3349,7 +3361,10 @@ pub async fn get_chat_contacts(context: &Context, chat_id: ChatId) -> Result<Vec
33493361 WHERE cc.chat_id=? AND cc.add_timestamp >= cc.remove_timestamp
33503362 ORDER BY c.id=1, c.last_seen DESC, c.id DESC;" ,
33513363 ( chat_id, ) ,
3352- |row| row. get :: < _ , ContactId > ( 0 ) ,
3364+ |row| {
3365+ let contact_id: ContactId = row. get ( 0 ) ?;
3366+ Ok ( contact_id)
3367+ } ,
33533368 )
33543369 . await
33553370}
@@ -3371,7 +3386,10 @@ pub async fn get_past_chat_contacts(context: &Context, chat_id: ChatId) -> Resul
33713386 AND ? < cc.remove_timestamp
33723387 ORDER BY c.id=1, cc.remove_timestamp DESC, c.id DESC" ,
33733388 ( chat_id, now. saturating_sub ( 60 * 24 * 3600 ) ) ,
3374- |row| row. get :: < _ , ContactId > ( 0 ) ,
3389+ |row| {
3390+ let contact_id: ContactId = row. get ( 0 ) ?;
3391+ Ok ( contact_id)
3392+ } ,
33753393 )
33763394 . await
33773395}
@@ -3734,11 +3752,13 @@ pub(crate) async fn shall_attach_selfavatar(context: &Context, chat_id: ChatId)
37343752 LEFT JOIN contacts c ON c.id=cc.contact_id
37353753 WHERE cc.chat_id=? AND cc.contact_id!=? AND cc.add_timestamp >= cc.remove_timestamp" ,
37363754 ( chat_id, ContactId :: SELF ) ,
3737- |row| Ok ( row. get :: < _ , i64 > ( 0 ) ) ,
3755+ |row| {
3756+ let selfavatar_sent: i64 = row. get ( 0 ) ?;
3757+ Ok ( selfavatar_sent)
3758+ } ,
37383759 |rows| {
37393760 let mut needs_attach = false ;
37403761 for row in rows {
3741- let row = row?;
37423762 let selfavatar_sent = row?;
37433763 if selfavatar_sent < timestamp_some_days_ago {
37443764 needs_attach = true ;
0 commit comments