From a56787e506efa3db49404a4bd5acb74f69bfeca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sat, 7 Sep 2024 14:54:15 +0200 Subject: [PATCH] chore: Fix new clippy lint The new lint that is handled here is too_long_first_doc_paragraph. --- crates/ruma-common/src/serde/raw.rs | 7 ++++--- crates/ruma-common/src/serde/strings.rs | 1 + crates/ruma-events/src/call/member.rs | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/ruma-common/src/serde/raw.rs b/crates/ruma-common/src/serde/raw.rs index 30b9cfda..065c9049 100644 --- a/crates/ruma-common/src/serde/raw.rs +++ b/crates/ruma-common/src/serde/raw.rs @@ -11,9 +11,10 @@ use serde::{ }; use serde_json::value::{to_raw_value as to_raw_json_value, RawValue as RawJsonValue}; -/// A wrapper around `Box`, to be used in place of any type in the Matrix endpoint -/// definition to allow request and response types to contain that said type represented by -/// the generic argument `Ev`. +/// A wrapper around `Box`. +/// +/// To be used in place of any type in the Matrix endpoint definition to allow request and response +/// types to contain that said type represented by the generic argument `Ev`. /// /// Ruma offers the `Raw` wrapper to enable passing around JSON text that is only partially /// validated. This is useful when a client receives events that do not follow the spec perfectly diff --git a/crates/ruma-common/src/serde/strings.rs b/crates/ruma-common/src/serde/strings.rs index 55d94e47..dcb3cef9 100644 --- a/crates/ruma-common/src/serde/strings.rs +++ b/crates/ruma-common/src/serde/strings.rs @@ -9,6 +9,7 @@ use serde::{ /// Serde deserialization decorator to map empty Strings to None, /// and forward non-empty Strings to the Deserialize implementation for T. +/// /// Useful for the typical /// "A room with an X event with an absent, null, or empty Y field /// should be treated the same as a room with no such event." diff --git a/crates/ruma-events/src/call/member.rs b/crates/ruma-events/src/call/member.rs index 03c35dff..faa8f6f5 100644 --- a/crates/ruma-events/src/call/member.rs +++ b/crates/ruma-events/src/call/member.rs @@ -147,7 +147,9 @@ pub struct EmptyMembershipData { } /// This is the optional value for an empty membership event content: -/// [`CallMemberEventContent::Empty`]. It is used when the user disconnected and a Future ([MSC4140](https://github.com/matrix-org/matrix-spec-proposals/pull/4140)) +/// [`CallMemberEventContent::Empty`]. +/// +/// It is used when the user disconnected and a Future ([MSC4140](https://github.com/matrix-org/matrix-spec-proposals/pull/4140)) /// was used to update the membership after the client was not reachable anymore. #[derive(Clone, PartialEq, StringEnum)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]