aboutsummaryrefslogtreecommitdiff
path: root/src/model/channel/message.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-10-02 22:29:10 +0200
committeracdenisSK <[email protected]>2017-10-02 22:29:10 +0200
commit6a4e52b3fac7d2e96e3a1a67901fbdd4721fb249 (patch)
treeae9ad7d7cb73d4ece6a199796af5975545071493 /src/model/channel/message.rs
parent`to_owned` -> `to_string` (diff)
downloadserenity-6a4e52b3fac7d2e96e3a1a67901fbdd4721fb249.tar.xz
serenity-6a4e52b3fac7d2e96e3a1a67901fbdd4721fb249.zip
Use the de-generification trick.
Fixes #168
Diffstat (limited to 'src/model/channel/message.rs')
-rw-r--r--src/model/channel/message.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/model/channel/message.rs b/src/model/channel/message.rs
index 55f61ba..52f5be5 100644
--- a/src/model/channel/message.rs
+++ b/src/model/channel/message.rs
@@ -419,6 +419,10 @@ impl Message {
/// [Add Reactions]: permissions/constant.ADD_REACTIONS.html
/// [permissions]: permissions
pub fn react<R: Into<ReactionType>>(&self, reaction_type: R) -> Result<()> {
+ self._react(reaction_type.into())
+ }
+
+ fn _react(&self, reaction_type: ReactionType) -> Result<()> {
#[cfg(feature = "cache")]
{
let req = Permissions::ADD_REACTIONS;
@@ -428,7 +432,7 @@ impl Message {
}
}
- http::create_reaction(self.channel_id.0, self.id.0, &reaction_type.into())
+ http::create_reaction(self.channel_id.0, self.id.0, &reaction_type)
}
/// Replies to the user, mentioning them prior to the content in the form