diff options
author | Jan-Erik Rediger <janerik@fnordig.de> | 2019-07-09 11:01:51 +0200 |
---|---|---|
committer | Jan-Erik Rediger <janerik@fnordig.de> | 2019-07-09 11:11:09 +0200 |
commit | 3951f003abb890b5115acf333f3d932ab22182ea (patch) | |
tree | d081bafacd13cbe11dbd61dce1fe6d183ad9594f /src | |
parent | c7d019030b20b33e3447a37d67ab5eebb078abba (diff) |
Force deref on `CowStr`
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |