From cd8e54ceec7e5d9e3b156f533a49f674a0fe08c4 Mon Sep 17 00:00:00 2001 From: Shayne Hartford Date: Tue, 9 Apr 2024 20:10:29 -0400 Subject: [PATCH] Format and fix spelling mistakes --- src/model/groups.rs | 19 +++++++++---------- src/query/groups.rs | 10 ++++++---- src/query/users.rs | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/model/groups.rs b/src/model/groups.rs index a4e0295..93c03dd 100644 --- a/src/model/groups.rs +++ b/src/model/groups.rs @@ -119,34 +119,33 @@ pub struct GroupAuditLogDataChange { #[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] -/// Details about a group (un)ban. +/// Details about a group un-ban. pub struct GroupBan { - /// Unique identifier of the (un)ban. + /// Unique identifier of the un-ban. pub id: String, /// Identifier of the group. pub group_id: crate::id::Group, - /// Identifier of the user who was (un)banned. + /// Identifier of the user who was un-banned. pub user_id: crate::id::User, - /// Flag indicating if the user was representing the group at the time of - /// (un)ban. + /// Flag indicating if the user was representing the group at the time of un-ban. pub is_representing: bool, /// List of role identifiers the user had in the group. pub role_ids: Vec, /// List of managed role identifiers the user had in the group. pub m_role_ids: Vec, - /// Timestamp of when the user joined. + /// Time of when the user joined. pub joined_at: Option, - /// Status of the user's membership in the group at the time of (un)ban. + /// Status of the user's membership in the group at the time of un-ban. pub membership_status: String, /// Visibility status of the user in the group. pub visibility: String, /// Flag indicating if the user was subscribed to group announcements. pub is_subscribed_to_announcements: bool, - /// Timestamp of the last post read by the user in the group. + /// Time of the last post read by the user in the group. pub last_post_read_at: Option, - /// Timestamp when the user joined the group. + /// Time when the user joined the group. pub created_at: String, - /// Timestamp when the user was (un)banned from the group. + /// Time when the user was un-banned from the group. pub banned_at: Option, /// Notes added by the group manager regarding the ban. pub manager_notes: String, diff --git a/src/query/groups.rs b/src/query/groups.rs index a177f60..e298418 100644 --- a/src/query/groups.rs +++ b/src/query/groups.rs @@ -79,12 +79,12 @@ impl Queryable for GroupBan { } } -/// Unbans a user from a Group. +/// Un-bans a user from a Group. #[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, Serialize)] pub struct GroupUnban { /// The ID of the group pub group_id: crate::id::Group, - /// The ID of the user to unban + /// The ID of the user to un-ban pub user_id: crate::id::User, } @@ -103,7 +103,7 @@ impl Queryable for GroupUnban { } } -/// Returns a LimitedGroup Member. +/// Returns a Limited Group Member. #[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, Serialize)] pub struct GroupMember { /// The ID of the group @@ -112,7 +112,9 @@ pub struct GroupMember { pub user_id: crate::id::User, } -impl Queryable> for GroupMember { +impl Queryable> + for GroupMember +{ fn url(&self, _: &Authentication) -> String { format!( "{}/groups/{}/members/{}", diff --git a/src/query/users.rs b/src/query/users.rs index a417990..8202ba2 100644 --- a/src/query/users.rs +++ b/src/query/users.rs @@ -21,7 +21,7 @@ impl Queryable for User { Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize, )] pub struct SearchUser { - /// Searches by displayName. Will return empty array if search query is empty + /// Searches by display name. Will return empty array if search query is empty /// or missing. pub search: String, /// The number of objects to return.