Skip to content

Commit 43bbd42

Browse files
committed
chore: inline variable and use From<bool> for WithLocking
1 parent 2d9f7d2 commit 43bbd42

File tree

1 file changed

+7
-4
lines changed
  • crates/matrix-sdk-ui/src/app

1 file changed

+7
-4
lines changed

crates/matrix-sdk-ui/src/app/mod.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,13 @@ impl AppBuilder {
233233
pub async fn build(self) -> Result<App, Error> {
234234
let (room_list, encryption_sync) = if self.with_encryption_sync {
235235
let room_list = RoomListService::new(self.client.clone()).await?;
236-
let with_lock =
237-
if self.with_cross_process_lock { WithLocking::Yes } else { WithLocking::No };
238-
let encryption_sync =
239-
EncryptionSync::new(self.identifier, self.client, None, with_lock).await?;
236+
let encryption_sync = EncryptionSync::new(
237+
self.identifier,
238+
self.client,
239+
None,
240+
WithLocking::from(self.with_cross_process_lock),
241+
)
242+
.await?;
240243
(room_list, Some(Arc::new(encryption_sync)))
241244
} else {
242245
let room_list = RoomListService::new_with_encryption(self.client.clone()).await?;

0 commit comments

Comments
 (0)