aboutsummaryrefslogtreecommitdiff
path: root/src/model/channel/group.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/channel/group.rs')
-rw-r--r--src/model/channel/group.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/model/channel/group.rs b/src/model/channel/group.rs
index dfccca3..418ce3a 100644
--- a/src/model/channel/group.rs
+++ b/src/model/channel/group.rs
@@ -49,10 +49,8 @@ impl Group {
///
/// [`http::add_group_recipient`]: ../http/fn.add_group_recipient.html
pub fn add_recipient<U: Into<UserId>>(&self, user: U) -> Result<()> {
- self._add_recipient(user.into())
- }
+ let user = user.into();
- fn _add_recipient(&self, user: UserId) -> Result<()> {
// If the group already contains the recipient, do nothing.
if self.recipients.contains_key(&user) {
return Ok(());
@@ -255,10 +253,8 @@ impl Group {
///
/// **Note**: This is only available to the group owner.
pub fn remove_recipient<U: Into<UserId>>(&self, user: U) -> Result<()> {
- self._remove_recipient(user.into())
- }
+ let user = user.into();
- fn _remove_recipient(&self, user: UserId) -> Result<()> {
// If the group does not contain the recipient already, do nothing.
if !self.recipients.contains_key(&user) {
return Ok(());