summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan-Erik Rediger <janerik@fnordig.de>2019-07-09 11:01:51 +0200
committerJan-Erik Rediger <janerik@fnordig.de>2019-07-09 11:11:09 +0200
commit3951f003abb890b5115acf333f3d932ab22182ea (patch)
treed081bafacd13cbe11dbd61dce1fe6d183ad9594f /src
parentc7d019030b20b33e3447a37d67ab5eebb078abba (diff)
Force deref on `CowStr`
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index d92129d..00823f1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -43,7 +43,7 @@ fn add_mermaid(content: &str) -> Result<String> {
let mut in_mermaid_block = false;
let events = Parser::new(content).map(|e| {
if let Event::Start(Tag::CodeBlock(code)) = e.clone() {
- if code == "mermaid" {
+ if &*code == "mermaid" {
in_mermaid_block = true;
mermaid_content.clear();
return None;
@@ -58,7 +58,7 @@ fn add_mermaid(content: &str) -> Result<String> {
match e {
Event::End(Tag::CodeBlock(code)) => {
- assert_eq!("mermaid", code, "After an opening mermaid code block we expect it to close again");
+ assert_eq!("mermaid", &*code, "After an opening mermaid code block we expect it to close again");
in_mermaid_block = false;
let mermaid_code = format!("<pre class=\"mermaid\">{}</pre>\n\n", mermaid_content);