From c482b1b5527de93ac3174fb90d6db7ca31b8704b Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Mon, 28 Dec 2020 22:15:45 +0900 Subject: [PATCH] Run cargo fmt --- plume-common/src/utils.rs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/plume-common/src/utils.rs b/plume-common/src/utils.rs index 7ef3a43a..d9949eaa 100644 --- a/plume-common/src/utils.rs +++ b/plume-common/src/utils.rs @@ -1,6 +1,6 @@ use heck::CamelCase; use openssl::rand::rand_bytes; -use pulldown_cmark::{html, LinkType, Event, Options, Parser, Tag, CodeBlockKind, CowStr}; +use pulldown_cmark::{html, CodeBlockKind, CowStr, Event, LinkType, Options, Parser, Tag}; use regex_syntax::is_word_character; use rocket::{ http::uri::Uri, @@ -69,7 +69,7 @@ fn highlight_code<'a>( match &kind { CodeBlockKind::Fenced(lang) if !lang.is_empty() => { *context = Some(HighlighterContext { content: vec![] }); - }, + } _ => {} } Some(vec![Event::Start(Tag::CodeBlock(kind))]) @@ -169,18 +169,21 @@ fn process_image<'a, 'b>( if let Some((url, cw)) = id.parse::().ok().and_then(processor.as_ref()) { if let (Some(cw), false) = (cw, inline) { // there is a cw, and where are not inline - Event::Html(CowStr::Boxed(format!( - r#"