Minor comment spelling and formatting fixes

This commit is contained in:
Amanda Graven 2021-01-18 16:12:28 +01:00 committed by GitHub
parent acf865092d
commit 85037832d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 10 deletions

View File

@ -67,7 +67,7 @@ use http::Method;
/// * `name`: A unique name for the endpoint. Generally this will be the same as the containing /// * `name`: A unique name for the endpoint. Generally this will be the same as the containing
/// module. /// module.
/// * `path`: The path component of the URL for the endpoint, e.g. "/foo/bar". Components of /// * `path`: The path component of the URL for the endpoint, e.g. "/foo/bar". Components of
/// the path that are parameterized can indicate a varible by using a Rust identifier /// the path that are parameterized can indicate a variable by using a Rust identifier
/// prefixed with a colon, e.g. `/foo/:some_parameter`. A corresponding query string /// prefixed with a colon, e.g. `/foo/:some_parameter`. A corresponding query string
/// parameter will be expected in the request struct (see below for details). /// parameter will be expected in the request struct (see below for details).
/// * `rate_limited`: Whether or not the endpoint enforces rate limiting on requests. /// * `rate_limited`: Whether or not the endpoint enforces rate limiting on requests.

View File

@ -26,7 +26,7 @@ pub struct AnswerEventContent {
} }
impl AnswerEventContent { impl AnswerEventContent {
/// Creates an `AnswerEventContent` with the gieven answer, call ID and VoIP version. /// Creates an `AnswerEventContent` with the given answer, call ID and VoIP version.
pub fn new(answer: SessionDescription, call_id: String, version: UInt) -> Self { pub fn new(answer: SessionDescription, call_id: String, version: UInt) -> Self {
Self { answer, call_id, version } Self { answer, call_id, version }
} }

View File

@ -14,7 +14,7 @@ pub type InviteEvent = MessageEvent<InviteEventContent>;
#[derive(Clone, Debug, Deserialize, Serialize, MessageEventContent)] #[derive(Clone, Debug, Deserialize, Serialize, MessageEventContent)]
#[ruma_event(type = "m.call.invite")] #[ruma_event(type = "m.call.invite")]
pub struct InviteEventContent { pub struct InviteEventContent {
/// A unique identifer for the call. /// A unique identifier for the call.
pub call_id: String, pub call_id: String,
/// The time in milliseconds that the invite is valid for. Once the invite age exceeds this /// The time in milliseconds that the invite is valid for. Once the invite age exceeds this

View File

@ -162,7 +162,7 @@
//! The collection types are enums which effectively "wrap" each possible event type of a //! The collection types are enums which effectively "wrap" each possible event type of a
//! particular event "kind." //! particular event "kind."
//! //!
//! Because of the hierarchical nature of event kinds in Matrix, these collection types are divied //! Because of the hierarchical nature of event kinds in Matrix, these collection types are divided
//! into two modules, `ruma_events::collections::all` and `ruma_events::collections::only`. //! into two modules, `ruma_events::collections::all` and `ruma_events::collections::only`.
//! The "all" versions include every event type that implements the relevant event trait as well as //! The "all" versions include every event type that implements the relevant event trait as well as
//! more specific event traits. //! more specific event traits.
@ -497,7 +497,7 @@ pub struct UnsignedDeHelper {
pub redacted_because: Option<IgnoredAny>, pub redacted_because: Option<IgnoredAny>,
} }
/// Helper struct to determine the event kind from a serde_json::value::RawValue. /// Helper struct to determine the event kind from a `serde_json::value::RawValue`.
#[doc(hidden)] #[doc(hidden)]
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
pub struct EventDeHelper { pub struct EventDeHelper {
@ -516,12 +516,12 @@ pub struct EventDeHelper {
/// the event will be deserialized as a ephemeral event. /// the event will be deserialized as a ephemeral event.
pub room_id: Option<IgnoredAny>, pub room_id: Option<IgnoredAny>,
/// If this `UnsignedData` contains a redacted_because key the event is /// If this `UnsignedData` contains a `redacted_because` key the event is
/// immediately deserialized as a redacted event. /// immediately deserialized as a redacted event.
pub unsigned: Option<UnsignedDeHelper>, pub unsigned: Option<UnsignedDeHelper>,
} }
/// Helper function for serde_json::value::RawValue deserialization. /// Helper function for `serde_json::value::RawValue` deserialization.
#[doc(hidden)] #[doc(hidden)]
pub fn from_raw_json_value<T, E>(val: &RawJsonValue) -> Result<T, E> pub fn from_raw_json_value<T, E>(val: &RawJsonValue) -> Result<T, E>
where where

View File

@ -1,6 +1,6 @@
//! A presence event is represented by a struct with a set content field. //! A presence event is represented by a struct with a set content field.
//! //!
//! The only content valid for this event is `PresenceEventContent. //! The only content valid for this event is `PresenceEventContent`.
use js_int::UInt; use js_int::UInt;
use ruma_common::presence::PresenceState; use ruma_common::presence::PresenceState;

View File

@ -121,7 +121,7 @@ pub struct JsonWebKey {
/// Required. Algorithm. Must be `A256CTR`. /// Required. Algorithm. Must be `A256CTR`.
pub alg: String, pub alg: String,
/// The key, encoded as urlsafe unpadded base64. /// The key, encoded as url-safe unpadded base64.
pub k: String, pub k: String,
/// Extractable. Must be `true`. This is a /// Extractable. Must be `true`. This is a

View File

@ -149,7 +149,7 @@ fn default_power_level() -> Int {
Int::from(50) Int::from(50)
} }
/// Used with #[serde(skip_serializing_if)] to omit default power levels. /// Used with `#[serde(skip_serializing_if)]` to omit default power levels.
#[allow(clippy::trivially_copy_pass_by_ref)] #[allow(clippy::trivially_copy_pass_by_ref)]
fn is_default_power_level(l: &Int) -> bool { fn is_default_power_level(l: &Int) -> bool {
*l == Int::from(50) *l == Int::from(50)