Skip to content

Commit 7466f77

Browse files
committed
refactor(ui): Replace tokio::spawn with matrix_sdk::executor::spawn
1 parent 526b5c4 commit 7466f77

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

crates/matrix-sdk-ui/src/sync_service.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ use std::sync::{Arc, Mutex};
2828
use eyeball::{SharedObservable, Subscriber};
2929
use futures_core::Future;
3030
use futures_util::{pin_mut, StreamExt as _};
31-
use matrix_sdk::Client;
31+
use matrix_sdk::{
32+
executor::{spawn, JoinHandle},
33+
Client,
34+
};
3235
use thiserror::Error;
33-
use tokio::{
34-
sync::{
35-
mpsc::{Receiver, Sender},
36-
Mutex as AsyncMutex, OwnedMutexGuard,
37-
},
38-
task::{spawn, JoinHandle},
36+
use tokio::sync::{
37+
mpsc::{Receiver, Sender},
38+
Mutex as AsyncMutex, OwnedMutexGuard,
3939
};
4040
use tracing::{error, info, instrument, trace, warn, Instrument, Level};
4141

crates/matrix-sdk-ui/src/unable_to_decrypt_hook.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@ use std::{
2424
};
2525

2626
use growable_bloom_filter::{GrowableBloom, GrowableBloomBuilder};
27-
use matrix_sdk::{crypto::types::events::UtdCause, Client};
27+
use matrix_sdk::{
28+
crypto::types::events::UtdCause,
29+
executor::{spawn, JoinHandle},
30+
Client,
31+
};
2832
use matrix_sdk_base::{StateStoreDataKey, StateStoreDataValue, StoreError};
2933
use ruma::{
3034
time::{Duration, Instant},
3135
EventId, MilliSecondsSinceUnixEpoch, OwnedEventId, OwnedServerName, UserId,
3236
};
3337
use tokio::{
34-
spawn,
3538
sync::{Mutex as AsyncMutex, MutexGuard},
36-
task::JoinHandle,
3739
time::sleep,
3840
};
3941
use tracing::error;

0 commit comments

Comments
 (0)