aboutsummaryrefslogtreecommitdiff
path: root/src/builder/create_embed.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-11-27 14:53:38 +0100
committeracdenisSK <[email protected]>2017-11-27 14:53:38 +0100
commit3ca7e15e55de640200edb3898a33b838946a506c (patch)
treeba165391712ea5047119df97a55443364e581d9c /src/builder/create_embed.rs
parentDo a temporary fix for options for commands created in the `command!` macro (diff)
downloadserenity-3ca7e15e55de640200edb3898a33b838946a506c.tar.xz
serenity-3ca7e15e55de640200edb3898a33b838946a506c.zip
Use `ToString`'s blanket impl for `Display`s
Diffstat (limited to 'src/builder/create_embed.rs')
-rw-r--r--src/builder/create_embed.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/builder/create_embed.rs b/src/builder/create_embed.rs
index 899138b..ae0975b 100644
--- a/src/builder/create_embed.rs
+++ b/src/builder/create_embed.rs
@@ -101,7 +101,7 @@ impl CreateEmbed {
pub fn description<D: Display>(mut self, description: D) -> Self {
self.0.insert(
"description",
- Value::String(format!("{}", description)),
+ Value::String(description.to_string()),
);
CreateEmbed(self.0)
@@ -281,7 +281,7 @@ impl CreateEmbed {
/// Set the title of the embed.
pub fn title<D: Display>(mut self, title: D) -> Self {
self.0
- .insert("title", Value::String(format!("{}", title)));
+ .insert("title", Value::String(title.to_string()));
CreateEmbed(self.0)
}
@@ -424,7 +424,7 @@ impl CreateEmbedFooter {
/// Set the footer's text.
pub fn text<D: Display>(mut self, text: D) -> Self {
- self.0.insert("text", Value::String(format!("{}", text)));
+ self.0.insert("text", Value::String(text.to_string()));
self
}