Use as_str() to get the string event type.

Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
This commit is contained in:
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

View file

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