diff options
| author | Zeyla Hellyer <[email protected]> | 2018-01-05 22:41:18 -0800 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2018-01-05 22:41:18 -0800 |
| commit | 85d7d5f6a6df9841659bc7ad8e392f31c1aae46c (patch) | |
| tree | 001ea9d81f51f8919a5b07cbea9f64621955dd35 /src/model/channel/mod.rs | |
| parent | Fix permission overwrites in permission building (diff) | |
| download | serenity-85d7d5f6a6df9841659bc7ad8e392f31c1aae46c.tar.xz serenity-85d7d5f6a6df9841659bc7ad8e392f31c1aae46c.zip | |
Further generic-ify `reaction_users` `after` param
Further generic-ify the `after` parameter on the `reaction_users` method
of the following structs:
- `ChannelId`
- `Group`
- `GuildChannel`
- `Message`
- `Channel`
- `GuildChannel`
Do this by changing the `U` trait bound from `Into<UserId>` to
`Into<Option<UserId>>`.
This resolves problems determining types when passing `None` as the
argument, as reported in #247.
Diffstat (limited to 'src/model/channel/mod.rs')
| -rw-r--r-- | src/model/channel/mod.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/model/channel/mod.rs b/src/model/channel/mod.rs index 00fc7f6..1a6bcd5 100644 --- a/src/model/channel/mod.rs +++ b/src/model/channel/mod.rs @@ -371,14 +371,14 @@ impl Channel { #[deprecated(since = "0.4.2", note = "Use the inner channel's method")] #[inline] pub fn reaction_users<M, R, U>(&self, - message_id: M, - reaction_type: R, - limit: Option<u8>, - after: Option<U>) - -> Result<Vec<User>> - where M: Into<MessageId>, R: Into<ReactionType>, U: Into<UserId> { - self.id() - .reaction_users(message_id, reaction_type, limit, after) + message_id: M, + reaction_type: R, + limit: Option<u8>, + after: U, + ) -> Result<Vec<User>> where M: Into<MessageId>, + R: Into<ReactionType>, + U: Into<Option<UserId>> { + self.id().reaction_users(message_id, reaction_type, limit, after) } /// Retrieves the Id of the inner [`Group`], [`GuildChannel`], or |