aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-08-04 11:48:03 +0200
committeracdenisSK <[email protected]>2017-08-04 11:48:03 +0200
commit0810ab7a6aa37ca684b10c22dde8f0e03d3f8ea2 (patch)
treefd89737ebcda2a4532049039e0566d645334aba3 /src/utils
parentAlso make the message builder use Display (diff)
downloadserenity-0810ab7a6aa37ca684b10c22dde8f0e03d3f8ea2.tar.xz
serenity-0810ab7a6aa37ca684b10c22dde8f0e03d3f8ea2.zip
Make so content and language can be of different types
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/message_builder.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/message_builder.rs b/src/utils/message_builder.rs
index ac9440d..2801f4b 100644
--- a/src/utils/message_builder.rs
+++ b/src/utils/message_builder.rs
@@ -236,7 +236,7 @@ impl MessageBuilder {
///
/// assert_eq!(content, "```\nhello\n```");
/// ```
- pub fn push_codeblock<D: fmt::Display>(mut self, content: D, language: Option<D>) -> Self {
+ pub fn push_codeblock<D: fmt::Display, L: fmt::Display>(mut self, content: D, language: Option<L>) -> Self {
self.0.push_str("```");
if let Some(language) = language {
@@ -504,7 +504,7 @@ impl MessageBuilder {
}
/// Pushes a code-block to your message normalizing content.
- pub fn push_codeblock_safe<D: fmt::Display>(mut self, content: D, language: Option<D>) -> Self {
+ pub fn push_codeblock_safe<D: fmt::Display, L: fmt::Display>(mut self, content: D, language: Option<L>) -> Self {
self.0.push_str("```");
if let Some(language) = language {