events: Use Into<RoomEventType> impls to avoid String roundtrips

This commit is contained in:
Jonas Platte 2022-04-29 12:22:48 +02:00
parent ad61d0c7b6
commit e479d2db05
No known key found for this signature in database
GPG Key ID: BBA95679259D342F

View File

@ -257,7 +257,7 @@ impl RoomPowerLevels {
user_pl
>= self
.events
.get(&message_type.to_string().into())
.get(&message_type.into())
.map(ToOwned::to_owned)
.unwrap_or(self.events_default)
}
@ -265,7 +265,7 @@ impl RoomPowerLevels {
user_pl
>= self
.events
.get(&state_type.to_string().into())
.get(&state_type.into())
.map(ToOwned::to_owned)
.unwrap_or(self.state_default)
}