diff options
| author | acdenisSK <[email protected]> | 2017-10-02 22:29:10 +0200 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-10-09 15:47:05 -0700 |
| commit | 2911f677431820ac858bae39ce53a3d6e202da1b (patch) | |
| tree | 1a65a208341e2a8006807f96074ca17cd0aaaed8 /src/model/invite.rs | |
| parent | `to_owned` -> `to_string` (diff) | |
| download | serenity-2911f677431820ac858bae39ce53a3d6e202da1b.tar.xz serenity-2911f677431820ac858bae39ce53a3d6e202da1b.zip | |
Use the de-generification trick.
Fixes #168
Diffstat (limited to 'src/model/invite.rs')
| -rw-r--r-- | src/model/invite.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/model/invite.rs b/src/model/invite.rs index b4f326c..9a836be 100644 --- a/src/model/invite.rs +++ b/src/model/invite.rs @@ -62,8 +62,11 @@ impl Invite { /// [permission]: permissions/index.html pub fn create<C, F>(channel_id: C, f: F) -> Result<RichInvite> where C: Into<ChannelId>, F: FnOnce(CreateInvite) -> CreateInvite { - let channel_id = channel_id.into(); + Self::_create(channel_id.into(), f) + } + fn _create<F>(channel_id: ChannelId, f: F) -> Result<RichInvite> + where F: FnOnce(CreateInvite) -> CreateInvite { #[cfg(feature = "cache")] { let req = Permissions::CREATE_INVITE; |