summaryrefslogtreecommitdiff
path: root/src/modules/files.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/files.rs')
-rw-r--r--src/modules/files.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/modules/files.rs b/src/modules/files.rs
index 607cee1..6336648 100644
--- a/src/modules/files.rs
+++ b/src/modules/files.rs
@@ -16,7 +16,6 @@ use hyper::{
Response, StatusCode,
};
use log::debug;
-use markup::Render;
use percent_encoding::percent_decode_str;
use serde::Deserialize;
use serde_yaml::Value;
@@ -320,14 +319,12 @@ async fn index(path: &Path, rpath: String) -> Result<String, ServiceError> {
.filter(|e| e.as_ref().map(|(e, _)| !e.starts_with(".")).unwrap_or(true))
.collect::<Result<Vec<_>, _>>()?;
let banner = read_to_string(path.join("index.banner.html")).await.ok();
- let mut s = String::new();
- IndexTemplate {
+ let s = IndexTemplate {
files,
banner,
path: rpath,
}
- .render(&mut s)
- .unwrap();
+ .to_string();
Ok(s)
}