aboutsummaryrefslogtreecommitdiff
path: root/src/model/channel/group.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-10-03 16:55:58 +0200
committerZeyla Hellyer <[email protected]>2017-10-09 15:47:48 -0700
commit06dc6937bd3d4e5912de08e4ac3630a1f83b7f5a (patch)
treeeee16dc9d1c35e2b17a0a59d55cc85fa82726587 /src/model/channel/group.rs
parentUse the de-generification trick. (diff)
downloadserenity-06dc6937bd3d4e5912de08e4ac3630a1f83b7f5a.tar.xz
serenity-06dc6937bd3d4e5912de08e4ac3630a1f83b7f5a.zip
Revert "Use the de-generification trick."
Makes the compiliation time just a bit worse
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(());