diff --git a/crates/ruma-client-api/src/r0/room/create_room.rs b/crates/ruma-client-api/src/r0/room/create_room.rs index 9ea754e4..b1af27eb 100644 --- a/crates/ruma-client-api/src/r0/room/create_room.rs +++ b/crates/ruma-client-api/src/r0/room/create_room.rs @@ -36,8 +36,7 @@ ruma_api! { /// List of state events to send to the new room. /// - /// Takes precedence over events set by preset, but gets overridden by - /// name and topic keys. + /// Takes precedence over events set by preset, but gets overridden by name and topic keys. #[serde(default, skip_serializing_if = "<[_]>::is_empty")] pub initial_state: &'a [Raw], @@ -55,8 +54,8 @@ ruma_api! { #[serde(default, skip_serializing_if = "ruma_serde::is_default")] pub is_direct: bool, - /// If this is included, an `m.room.name` event will be sent into the room to indicate - /// the name of the room. + /// If this is included, an `m.room.name` event will be sent into the room to indicate the + /// name of the room. #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<&'a RoomName>, diff --git a/crates/ruma-events/src/enums.rs b/crates/ruma-events/src/enums.rs index a1a9c721..a65da240 100644 --- a/crates/ruma-events/src/enums.rs +++ b/crates/ruma-events/src/enums.rs @@ -169,15 +169,17 @@ impl AnyRoomEvent { room_ev_accessor!(sender: &UserId); } -/// Any sync room event (room event without a `room_id`, as returned in `/sync` responses) +/// Any sync room event. +/// +/// Sync room events are room event without a `room_id`, as returned in `/sync` responses. #[allow(clippy::large_enum_variant, clippy::exhaustive_enums)] #[derive(Clone, Debug, Serialize, EventEnumFromEvent)] #[serde(untagged)] pub enum AnySyncRoomEvent { - /// Any sync message event + /// Any sync message event. Message(AnySyncMessageEvent), - /// Any sync state event + /// Any sync state event. State(AnySyncStateEvent), /// Any sync message event that has been redacted. diff --git a/crates/ruma-events/src/key/verification/mac.rs b/crates/ruma-events/src/key/verification/mac.rs index 5c22cfeb..5ed1a3eb 100644 --- a/crates/ruma-events/src/key/verification/mac.rs +++ b/crates/ruma-events/src/key/verification/mac.rs @@ -31,8 +31,8 @@ pub struct ToDeviceMacEventContent { } impl ToDeviceMacEventContent { - /// Creates a new `ToDeviceMacEventContent` with the given transaction ID, key ID to MAC - /// map and key MAC. + /// Creates a new `ToDeviceMacEventContent` with the given transaction ID, key ID to MAC map and + /// key MAC. pub fn new(transaction_id: String, mac: BTreeMap, keys: String) -> Self { Self { transaction_id, mac, keys } } diff --git a/crates/ruma-events/src/key/verification/start.rs b/crates/ruma-events/src/key/verification/start.rs index 33e6a58f..cfb59abf 100644 --- a/crates/ruma-events/src/key/verification/start.rs +++ b/crates/ruma-events/src/key/verification/start.rs @@ -120,8 +120,7 @@ pub struct ReciprocateV1Content { impl ReciprocateV1Content { /// Create a new `ReciprocateV1Content` with the given shared secret. /// - /// The shared secret needs to come from the scanned QR code, encoded using - /// unpadded base64. + /// The shared secret needs to come from the scanned QR code, encoded using unpadded base64. pub fn new(secret: String) -> Self { Self { secret } } diff --git a/crates/ruma-events/src/room.rs b/crates/ruma-events/src/room.rs index 872dbe20..6e0bbe99 100644 --- a/crates/ruma-events/src/room.rs +++ b/crates/ruma-events/src/room.rs @@ -123,6 +123,7 @@ pub struct EncryptedFile { pub iv: String, /// A map from an algorithm name to a hash of the ciphertext, encoded as unpadded base64. + /// /// Clients should support the SHA-256 hash, which uses the key sha256. pub hashes: BTreeMap, @@ -147,6 +148,7 @@ pub struct EncryptedFileInit { pub iv: String, /// A map from an algorithm name to a hash of the ciphertext, encoded as unpadded base64. + /// /// Clients should support the SHA-256 hash, which uses the key sha256. pub hashes: BTreeMap, @@ -180,7 +182,9 @@ pub struct JsonWebKey { /// The key, encoded as url-safe unpadded base64. pub k: String, - /// Extractable. Must be `true`. This is a + /// Extractable. + /// + /// Must be `true`. This is a /// [W3C extension](https://w3c.github.io/webcrypto/#iana-section-jwk). pub ext: bool, } @@ -204,7 +208,9 @@ pub struct JsonWebKeyInit { /// The key, encoded as url-safe unpadded base64. pub k: String, - /// Extractable. Must be `true`. This is a + /// Extractable. + /// + /// Must be `true`. This is a /// [W3C extension](https://w3c.github.io/webcrypto/#iana-section-jwk). pub ext: bool, }