state-res: Replace if let with match

This commit is contained in:
Jonas Platte 2021-09-04 12:28:52 +02:00
parent 324fb58a62
commit 1a4b7903b8
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67

View File

@ -604,11 +604,10 @@ where
} }
} }
let current_state = if let Some(current_state) = previous_power_event { let current_state = match previous_power_event {
current_state Some(current_state) => current_state,
} else {
// If there is no previous m.room.power_levels event in the room, allow // If there is no previous m.room.power_levels event in the room, allow
return Some(true); None => return Some(true),
}; };
// If users key in content is not a dictionary with keys that are valid user IDs // If users key in content is not a dictionary with keys that are valid user IDs