From f56840a4c04b18fcc6955d7105d32ec9bd6b01dd Mon Sep 17 00:00:00 2001 From: Gaurav Date: Wed, 3 Aug 2022 20:03:37 -0400 Subject: Satisfy cargo fmt --- src/renderer.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/renderer.rs') diff --git a/src/renderer.rs b/src/renderer.rs index 5fdd2be..3ce985b 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -2,11 +2,11 @@ use actix_web::http::StatusCode; use chrono::{DateTime, Utc}; use chrono_humanize::Humanize; use clap::{crate_name, crate_version}; +use comrak::{markdown_to_html, ComrakOptions}; use maud::{html, Markup, PreEscaped, DOCTYPE}; use std::path::PathBuf; use std::time::SystemTime; use strum::IntoEnumIterator; -use comrak::{markdown_to_html, ComrakOptions}; use crate::auth::CurrentUser; use crate::listing::{Breadcrumb, Entry, QueryParameters, SortingMethod, SortingOrder}; @@ -168,17 +168,17 @@ pub fn page( } } } - @if readme.is_some() { - div { - h3 { (readme.as_ref().unwrap().file_name().unwrap() - .to_string_lossy().to_string()) } - (PreEscaped - (markdown_to_html( - &std::fs::read_to_string(readme.unwrap()) - .unwrap_or_else(|_| "Cannot read File.".to_string()), - &ComrakOptions::default()))); - } - } + @if readme.is_some() { + div { + h3 { (readme.as_ref().unwrap().file_name().unwrap() + .to_string_lossy().to_string()) } + (PreEscaped + (markdown_to_html( + &std::fs::read_to_string(readme.unwrap()) + .unwrap_or_else(|_| "Cannot read File.".to_string()), + &ComrakOptions::default()))); + } + } a.back href="#top" { (arrow_up()) } -- cgit v1.2.3