Closed farodin91 closed 8 years ago
That's expected behavior, because the from_str
API is for converting from JSON, which includes literal double quotes around string values. What you actually want here is an implementation of std::str::FromStr
, which would need to be implemented in ruma-events. I'm gonna close this and open an issue over there to do that.
from_str(&self.event_type)?
https://github.com/ruma/ruma/blob/master/src/event.rs#L180For example:
"m.room.join_rules"
=>Err(Syntax(ExpectedSomeValue,1,1))
"\"m.room.join_rules\""
=>Ok(EventType::RoomJoinRules)