From 19ab9c632e4a12dd7c7c30f56317bf26cb0e3f2f Mon Sep 17 00:00:00 2001 From: Gaurav Date: Thu, 11 Aug 2022 21:46:56 -0400 Subject: Add `--readme` info and reformat --- src/renderer.rs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/renderer.rs') diff --git a/src/renderer.rs b/src/renderer.rs index 3ce985b..abf6053 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -12,6 +12,7 @@ use crate::auth::CurrentUser; use crate::listing::{Breadcrumb, Entry, QueryParameters, SortingMethod, SortingOrder}; use crate::{archive::ArchiveMethod, MiniserveConfig}; +#[allow(clippy::too_many_arguments)] /// Renders the file listing pub fn page( entries: Vec, @@ -169,15 +170,15 @@ 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()))); - } + 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