events: Use Into<RoomEventType> impls to avoid String roundtrips
@@ -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)
}
