Use as_str() to get the string event type.

Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
master
poljar 2021-04-29 15:33:45 +02:00 committed by GitHub
parent c720abfa87
commit 22b333a0d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1350,7 +1350,7 @@ impl BaseClient {
pub async fn get_push_rules(&self, changes: &StateChanges) -> Result<Ruleset> { pub async fn get_push_rules(&self, changes: &StateChanges) -> Result<Ruleset> {
if let Some(AnyBasicEvent::PushRules(event)) = changes if let Some(AnyBasicEvent::PushRules(event)) = changes
.account_data .account_data
.get(&EventType::PushRules.to_string()) .get(EventType::PushRules.as_str())
.and_then(|e| e.deserialize().ok()) .and_then(|e| e.deserialize().ok())
{ {
Ok(event.content.global) Ok(event.content.global)