aboutsummaryrefslogtreecommitdiff
path: root/src/model/channel/message.rs
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2018-01-05 22:41:18 -0800
committerZeyla Hellyer <[email protected]>2018-01-05 22:41:18 -0800
commit85d7d5f6a6df9841659bc7ad8e392f31c1aae46c (patch)
tree001ea9d81f51f8919a5b07cbea9f64621955dd35 /src/model/channel/message.rs
parentFix permission overwrites in permission building (diff)
downloadserenity-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/message.rs')
-rw-r--r--src/model/channel/message.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/model/channel/message.rs b/src/model/channel/message.rs
index 1bb55ab..f3834bd 100644
--- a/src/model/channel/message.rs
+++ b/src/model/channel/message.rs
@@ -313,14 +313,14 @@ impl Message {
/// [`User`]: struct.User.html
/// [Read Message History]: permissions/constant.READ_MESSAGE_HISTORY.html
#[inline]
- pub fn reaction_users<R, U>(&self,
- reaction_type: R,
- limit: Option<u8>,
- after: Option<U>)
- -> Result<Vec<User>>
- where R: Into<ReactionType>, U: Into<UserId> {
- self.channel_id
- .reaction_users(self.id, reaction_type, limit, after)
+ pub fn reaction_users<R, U>(
+ &self,
+ reaction_type: R,
+ limit: Option<u8>,
+ after: U,
+ ) -> Result<Vec<User>> where R: Into<ReactionType>,
+ U: Into<Option<UserId>> {
+ self.channel_id.reaction_users(self.id, reaction_type, limit, after)
}
/// Returns the associated `Guild` for the message if one is in the cache.