@@ -21,7 +21,7 @@ use std::{
21
21
io:: { Cursor , Read , Write } ,
22
22
iter,
23
23
path:: PathBuf ,
24
- sync:: { Arc , Mutex as StdMutex } ,
24
+ sync:: Arc ,
25
25
} ;
26
26
27
27
use eyeball:: { SharedObservable , Subscriber } ;
@@ -37,7 +37,7 @@ use matrix_sdk_base::crypto::{
37
37
} ,
38
38
CrossSigningBootstrapRequests , OlmMachine ,
39
39
} ;
40
- use matrix_sdk_common:: executor:: spawn;
40
+ use matrix_sdk_common:: { executor:: spawn, locks :: Mutex as StdMutex } ;
41
41
use ruma:: {
42
42
api:: client:: {
43
43
keys:: {
@@ -131,7 +131,7 @@ impl EncryptionData {
131
131
pub fn initialize_room_key_tasks ( & self , client : & Arc < ClientInner > ) {
132
132
let weak_client = WeakClient :: from_inner ( client) ;
133
133
134
- let mut tasks = self . tasks . lock ( ) . unwrap ( ) ;
134
+ let mut tasks = self . tasks . lock ( ) ;
135
135
tasks. upload_room_keys = Some ( BackupUploadingTask :: new ( weak_client. clone ( ) ) ) ;
136
136
137
137
if self . encryption_settings . backup_download_strategy
@@ -147,7 +147,7 @@ impl EncryptionData {
147
147
/// This should happen after the usual tasks have been set up and after the
148
148
/// E2EE initialization tasks have been set up.
149
149
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 ( ) ;
151
151
152
152
let future = Recovery :: update_state_after_backup_state_change ( client) ;
153
153
let join_handle = spawn ( future) ;
@@ -1653,7 +1653,7 @@ impl Encryption {
1653
1653
/// allow for the initial upload of cross-signing keys without
1654
1654
/// authentication, rendering this parameter obsolete.
1655
1655
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 ( ) ;
1657
1657
1658
1658
let this = self . clone ( ) ;
1659
1659
tasks. setup_e2ee = Some ( spawn ( async move {
@@ -1679,7 +1679,7 @@ impl Encryption {
1679
1679
/// Waits for end-to-end encryption initialization tasks to finish, if any
1680
1680
/// was running in the background.
1681
1681
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 ( ) ;
1683
1683
1684
1684
if let Some ( task) = task {
1685
1685
if let Err ( err) = task. await {
0 commit comments