@@ -21,7 +21,7 @@ use std::{
2121 io:: { Cursor , Read , Write } ,
2222 iter,
2323 path:: PathBuf ,
24- sync:: { Arc , Mutex as StdMutex } ,
24+ sync:: Arc ,
2525} ;
2626
2727use eyeball:: { SharedObservable , Subscriber } ;
@@ -37,7 +37,7 @@ use matrix_sdk_base::crypto::{
3737 } ,
3838 CrossSigningBootstrapRequests , OlmMachine ,
3939} ;
40- use matrix_sdk_common:: executor:: spawn;
40+ use matrix_sdk_common:: { executor:: spawn, locks :: Mutex as StdMutex } ;
4141use ruma:: {
4242 api:: client:: {
4343 keys:: {
@@ -131,7 +131,7 @@ impl EncryptionData {
131131 pub fn initialize_room_key_tasks ( & self , client : & Arc < ClientInner > ) {
132132 let weak_client = WeakClient :: from_inner ( client) ;
133133
134- let mut tasks = self . tasks . lock ( ) . unwrap ( ) ;
134+ let mut tasks = self . tasks . lock ( ) ;
135135 tasks. upload_room_keys = Some ( BackupUploadingTask :: new ( weak_client. clone ( ) ) ) ;
136136
137137 if self . encryption_settings . backup_download_strategy
@@ -147,7 +147,7 @@ impl EncryptionData {
147147 /// This should happen after the usual tasks have been set up and after the
148148 /// E2EE initialization tasks have been set up.
149149 pub fn initialize_recovery_state_update_task ( & self , client : & Client ) {
150- let mut guard = self . tasks . lock ( ) . unwrap ( ) ;
150+ let mut guard = self . tasks . lock ( ) ;
151151
152152 let future = Recovery :: update_state_after_backup_state_change ( client) ;
153153 let join_handle = spawn ( future) ;
@@ -1653,7 +1653,7 @@ impl Encryption {
16531653 /// allow for the initial upload of cross-signing keys without
16541654 /// authentication, rendering this parameter obsolete.
16551655 pub ( crate ) fn spawn_initialization_task ( & self , auth_data : Option < AuthData > ) {
1656- let mut tasks = self . client . inner . e2ee . tasks . lock ( ) . unwrap ( ) ;
1656+ let mut tasks = self . client . inner . e2ee . tasks . lock ( ) ;
16571657
16581658 let this = self . clone ( ) ;
16591659 tasks. setup_e2ee = Some ( spawn ( async move {
@@ -1679,7 +1679,7 @@ impl Encryption {
16791679 /// Waits for end-to-end encryption initialization tasks to finish, if any
16801680 /// was running in the background.
16811681 pub async fn wait_for_e2ee_initialization_tasks ( & self ) {
1682- let task = self . client . inner . e2ee . tasks . lock ( ) . unwrap ( ) . setup_e2ee . take ( ) ;
1682+ let task = self . client . inner . e2ee . tasks . lock ( ) . setup_e2ee . take ( ) ;
16831683
16841684 if let Some ( task) = task {
16851685 if let Err ( err) = task. await {
0 commit comments