diff options
| author | acdenisSK <[email protected]> | 2017-08-24 15:26:49 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-08-24 16:36:01 +0200 |
| commit | b3a5bc89ad1c09290fb1c15ca3b36fe17c3796f3 (patch) | |
| tree | 315e16f7b252d22b5f832302e722a85c9e6a9b6e /src/builder/create_message.rs | |
| parent | Allow FromStr for User to use REST (#147) (diff) | |
| download | serenity-b3a5bc89ad1c09290fb1c15ca3b36fe17c3796f3.tar.xz serenity-b3a5bc89ad1c09290fb1c15ca3b36fe17c3796f3.zip | |
Revamp `RwLock` usage in the lib
Also not quite sure if they goofed rustfmt or something, but its changes it did were a bit bizarre.
Diffstat (limited to 'src/builder/create_message.rs')
| -rw-r--r-- | src/builder/create_message.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/builder/create_message.rs b/src/builder/create_message.rs index 1ac5211..32cd781 100644 --- a/src/builder/create_message.rs +++ b/src/builder/create_message.rs @@ -46,10 +46,8 @@ impl CreateMessage { /// /// **Note**: Message contents must be under 2000 unicode code points. pub fn content<D: Display>(mut self, content: D) -> Self { - self.0.insert( - "content".to_owned(), - Value::String(format!("{}", content)), - ); + self.0 + .insert("content".to_owned(), Value::String(format!("{}", content))); CreateMessage(self.0, self.1) } @@ -76,7 +74,7 @@ impl CreateMessage { } /// Adds a list of reactions to create after the message's sent. - pub fn reactions<R: Into<ReactionType>>(mut self, reactions: Vec<R>) -> Self { +pub fn reactions<R: Into<ReactionType>>(mut self, reactions: Vec<R>) -> Self{ self.1 = Some(reactions.into_iter().map(|r| r.into()).collect()); CreateMessage(self.0, self.1) |