From 499c615f557f2dc9cdf83d0793ea9318f9febf2f Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Tue, 13 Apr 2021 12:35:25 +0200 Subject: [PATCH] events: Clean up some comments --- ruma-events/src/room/message.rs | 2 +- ruma-events/src/room/relationships.rs | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ruma-events/src/room/message.rs b/ruma-events/src/room/message.rs index 3a6ae80f..24f9634a 100644 --- a/ruma-events/src/room/message.rs +++ b/ruma-events/src/room/message.rs @@ -210,7 +210,7 @@ impl From for MessageEventContent { } /// Enum modeling the different ways relationships can be expressed in a -/// `m.relates_to` field of an m.room.message event. +/// `m.relates_to` field of an `m.room.message` event. #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(from = "RelatesToJsonRepr", into = "RelatesToJsonRepr")] pub enum Relation { diff --git a/ruma-events/src/room/relationships.rs b/ruma-events/src/room/relationships.rs index 8cdc5654..4ec38fb7 100644 --- a/ruma-events/src/room/relationships.rs +++ b/ruma-events/src/room/relationships.rs @@ -1,7 +1,7 @@ //! Types for event relationships. //! -//! Events in Matrix can relate to one another in a couple of ways, this module -//! adds types to parse the relationship of an event if any exists. +//! Events in Matrix can relate to one another in a couple of ways, this module adds types to parse +//! the relationship of an event if any exists. //! //! MSC for all the relates_to types except replies: //! @@ -10,18 +10,17 @@ use ruma_identifiers::EventId; use serde::{Deserialize, Serialize}; use serde_json::Value as JsonValue; -/// Enum modeling the different ways relationships can be expressed in a -/// `m.relates_to` field of an event. +/// Enum modeling the different ways relationships can be expressed in a `m.relates_to` field of an +/// event. #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(untagged)] pub(crate) enum RelatesToJsonRepr { - /// A relation which contains subtypes indicating the type of the - /// relationship with the `rel_type` field. + /// A relation which contains subtypes indicating the type of the relationship with the + /// `rel_type` field. #[cfg(feature = "unstable-pre-spec")] Relation(RelationJsonRepr), - /// An `m.in_reply_to` relationship indicating that the event is a reply to - /// another event. + /// An `m.in_reply_to` relationship indicating that the event is a reply to another event. Reply { /// Information about another message being replied to. #[serde(rename = "m.in_reply_to")]