aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2017-01-03 20:25:10 -0800
committerAustin Hellyer <[email protected]>2017-01-04 11:58:34 -0800
commit8df5e4db8e63c3d450102202aa62da909b3e06d2 (patch)
tree5b3db2cfc8aac9f9ca75ada7b779af7c0807569d /src
parentFix Context::get_reaction_users docs (diff)
downloadserenity-8df5e4db8e63c3d450102202aa62da909b3e06d2.tar.xz
serenity-8df5e4db8e63c3d450102202aa62da909b3e06d2.zip
Simplify Context::get_reaction_users
Diffstat (limited to 'src')
-rw-r--r--src/client/context.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/client/context.rs b/src/client/context.rs
index 4e4f6d1..b99dcfc 100644
--- a/src/client/context.rs
+++ b/src/client/context.rs
@@ -1316,11 +1316,7 @@ impl Context {
M: Into<MessageId>,
R: Into<ReactionType>,
U: Into<UserId> {
- let limit = limit.map(|x| if x > 100 {
- 100
- } else {
- x
- }).unwrap_or(50);
+ let limit = limit.map_or(50, |x| if x > 100 { 100 } else { x });
rest::get_reaction_users(channel_id.into().0,
message_id.into().0,