Remove redundant braces

master
Jonas Platte 2020-07-25 02:32:50 +02:00
parent 14db34beee
commit d4fe2fe0a2
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
1 changed files with 13 additions and 18 deletions

View File

@ -469,13 +469,11 @@ impl BaseClient {
// a store path was provided.
if self.state_store.read().await.is_none() {
#[cfg(not(target_arch = "wasm32"))]
{
if let Some(path) = &*self.store_path {
let store = JsonStore::open(path)?;
*self.state_store.write().await = Some(Box::new(store));
}
}
}
self.sync_with_state_store(&session).await?;
@ -719,7 +717,6 @@ impl BaseClient {
#[allow(unused_mut)]
Ok(mut e) => {
#[cfg(feature = "encryption")]
{
if let AnySyncRoomEvent::Message(AnySyncMessageEvent::RoomEncrypted(
ref mut encrypted_event,
)) = e
@ -727,8 +724,7 @@ impl BaseClient {
let mut olm = self.olm.lock().await;
if let Some(o) = &mut *olm {
if let Ok(decrypted) =
o.decrypt_room_event(&encrypted_event, room_id).await
if let Ok(decrypted) = o.decrypt_room_event(&encrypted_event, room_id).await
{
if let Ok(d) = decrypted.deserialize() {
e = d
@ -737,7 +733,6 @@ impl BaseClient {
}
}
}
}
let room_lock = self.get_or_create_joined_room(&room_id).await?;
let mut room = room_lock.write().await;