docs: Fix some wording issues

This commit is contained in:
Kévin Commaille 2021-04-07 16:55:59 +02:00
parent 154f9b2d58
commit d3ee7c4d74
No known key found for this signature in database
GPG Key ID: 483BCF4C5AF1E1E5
3 changed files with 25 additions and 25 deletions

View File

@ -11,8 +11,8 @@ use serde::{Deserialize, Serialize};
pub struct NotificationPowerLevels { pub struct NotificationPowerLevels {
/// The level required to trigger an `@room` notification. /// The level required to trigger an `@room` notification.
/// ///
/// If you activate the `compat` feature, this field being a string in JSON will give /// If you activate the `compat` feature, deserialization will work for stringified
/// you an `Int` here. /// integers too.
#[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))] #[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))]
#[serde(default = "default_power_level")] #[serde(default = "default_power_level")]
pub room: Int, pub room: Int,

View File

@ -21,8 +21,8 @@ pub type PowerLevelsEvent = StateEvent<PowerLevelsEventContent>;
pub struct PowerLevelsEventContent { pub struct PowerLevelsEventContent {
/// The level required to ban a user. /// The level required to ban a user.
/// ///
/// If you activate the `compat` feature, this field being a string in JSON will give /// If you activate the `compat` feature, deserialization will work for stringified
/// you an `Int` here. /// integers too.
#[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))] #[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))]
#[serde(default = "default_power_level", skip_serializing_if = "is_default_power_level")] #[serde(default = "default_power_level", skip_serializing_if = "is_default_power_level")]
#[ruma_event(skip_redaction)] #[ruma_event(skip_redaction)]
@ -32,8 +32,8 @@ pub struct PowerLevelsEventContent {
/// ///
/// This is a mapping from event type to power level required. /// This is a mapping from event type to power level required.
/// ///
/// If you activate the `compat` feature, the value being a string in JSON will give /// If you activate the `compat` feature, deserialization will work for stringified
/// you an `Int` here. /// integers too.
#[cfg_attr( #[cfg_attr(
feature = "compat", feature = "compat",
serde(deserialize_with = "ruma_serde::btreemap_int_or_string_to_int_values") serde(deserialize_with = "ruma_serde::btreemap_int_or_string_to_int_values")
@ -44,8 +44,8 @@ pub struct PowerLevelsEventContent {
/// The default level required to send message events. /// The default level required to send message events.
/// ///
/// If you activate the `compat` feature, this field being a string in JSON will give /// If you activate the `compat` feature, deserialization will work for stringified
/// you an `Int` here. /// integers too.
#[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))] #[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))]
#[serde(default, skip_serializing_if = "ruma_serde::is_default")] #[serde(default, skip_serializing_if = "ruma_serde::is_default")]
#[ruma_event(skip_redaction)] #[ruma_event(skip_redaction)]
@ -53,16 +53,16 @@ pub struct PowerLevelsEventContent {
/// The level required to invite a user. /// The level required to invite a user.
/// ///
/// If you activate the `compat` feature, this field being a string in JSON will give /// If you activate the `compat` feature, deserialization will work for stringified
/// you an `Int` here. /// integers too.
#[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))] #[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))]
#[serde(default = "default_power_level", skip_serializing_if = "is_default_power_level")] #[serde(default = "default_power_level", skip_serializing_if = "is_default_power_level")]
pub invite: Int, pub invite: Int,
/// The level required to kick a user. /// The level required to kick a user.
/// ///
/// If you activate the `compat` feature, this field being a string in JSON will give /// If you activate the `compat` feature, deserialization will work for stringified
/// you an `Int` here. /// integers too.
#[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))] #[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))]
#[serde(default = "default_power_level", skip_serializing_if = "is_default_power_level")] #[serde(default = "default_power_level", skip_serializing_if = "is_default_power_level")]
#[ruma_event(skip_redaction)] #[ruma_event(skip_redaction)]
@ -70,8 +70,8 @@ pub struct PowerLevelsEventContent {
/// The level required to redact an event. /// The level required to redact an event.
/// ///
/// If you activate the `compat` feature, this field being a string in JSON will give /// If you activate the `compat` feature, deserialization will work for stringified
/// you an `Int` here. /// integers too.
#[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))] #[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))]
#[serde(default = "default_power_level", skip_serializing_if = "is_default_power_level")] #[serde(default = "default_power_level", skip_serializing_if = "is_default_power_level")]
#[ruma_event(skip_redaction)] #[ruma_event(skip_redaction)]
@ -79,8 +79,8 @@ pub struct PowerLevelsEventContent {
/// The default level required to send state events. /// The default level required to send state events.
/// ///
/// If you activate the `compat` feature, this field being a string in JSON will give /// If you activate the `compat` feature, deserialization will work for stringified
/// you an `Int` here. /// integers too.
#[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))] #[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))]
#[serde(default = "default_power_level", skip_serializing_if = "is_default_power_level")] #[serde(default = "default_power_level", skip_serializing_if = "is_default_power_level")]
#[ruma_event(skip_redaction)] #[ruma_event(skip_redaction)]
@ -90,8 +90,8 @@ pub struct PowerLevelsEventContent {
/// ///
/// This is a mapping from `user_id` to power level for that user. /// This is a mapping from `user_id` to power level for that user.
/// ///
/// If you activate the `compat` feature, the value being a string in JSON will give /// If you activate the `compat` feature, deserialization will work for stringified
/// you an `Int` here. /// integers too.
#[cfg_attr( #[cfg_attr(
feature = "compat", feature = "compat",
serde(deserialize_with = "ruma_serde::btreemap_int_or_string_to_int_values") serde(deserialize_with = "ruma_serde::btreemap_int_or_string_to_int_values")
@ -102,8 +102,8 @@ pub struct PowerLevelsEventContent {
/// The default power level for every user in the room. /// The default power level for every user in the room.
/// ///
/// If you activate the `compat` feature, this field being a string in JSON will give /// If you activate the `compat` feature, deserialization will work for stringified
/// you an `Int` here. /// integers too.
#[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))] #[cfg_attr(feature = "compat", serde(deserialize_with = "ruma_serde::int_or_string_to_int"))]
#[serde(default, skip_serializing_if = "ruma_serde::is_default")] #[serde(default, skip_serializing_if = "ruma_serde::is_default")]
#[ruma_event(skip_redaction)] #[ruma_event(skip_redaction)]

View File

@ -7,8 +7,8 @@
//! //!
//! Which crates are re-exported can be configured through cargo features. //! Which crates are re-exported can be configured through cargo features.
//! //!
//! > ⚠ Some details might be missing because of the re-exports so you may need to refer to the //! > ⚠ Some details might be missing because rustdoc has trouble with re-exports so you may need
//! other crates' documentations. //! to refer to other crates' documentations.
//! //!
//! # API features //! # API features
//! //!
@ -42,12 +42,12 @@
//! //!
//! By using these features, you opt out of all semver guarantees Ruma otherwise provides: //! By using these features, you opt out of all semver guarantees Ruma otherwise provides:
//! //!
//! * `unstable-exhaustive-types` -- The events in Ruma are marked as non-exhaustive to avoid //! * `unstable-exhaustive-types` -- Most types in Ruma are marked as non-exhaustive to avoid
//! breaking changes when new fields are added in the specification. This feature compiles all //! breaking changes when new fields are added in the specification. This feature compiles all
//! types as exhaustive. //! types as exhaustive.
//! * `unstable-pre-spec` -- Upcoming Matrix features that may be subject to change or removal. //! * `unstable-pre-spec` -- Upcoming Matrix features that may be subject to change or removal.
//! * `unstable-synapse-quirks` -- Improve compatibility with Synapse homeservers where it deviates //! * `unstable-synapse-quirks` -- Fix issues for clients expecting to connect to Synapse
//! from the specification. //! homeservers, at the expense of being less compatible with other homeservers.
//! //!
//! # Common features //! # Common features
//! //!