diff --git a/crates/ruma-events/src/lib.rs b/crates/ruma-events/src/lib.rs index f657f9b3..0c746b06 100644 --- a/crates/ruma-events/src/lib.rs +++ b/crates/ruma-events/src/lib.rs @@ -284,15 +284,11 @@ pub trait RedactContent { /// Extension trait for Raw pub trait RawExt { - /// Try to deserialize the JSON as event content + /// Try to deserialize the JSON as an event's content. fn deserialize_content(self, event_type: &str) -> Result; } -impl RawExt for Raw -where - T: EventContent, -{ - /// Try to deserialize the JSON as event content +impl RawExt for Raw { fn deserialize_content(self, event_type: &str) -> Result { T::from_parts(event_type, self.into_json()) }