Cleanup web

This commit is contained in:
Austen Adler 2023-03-11 17:50:14 -05:00
parent fe26ee3e42
commit 11b711f878

View File

@ -23,8 +23,7 @@ pub(crate) fn dist(file: PathBuf) -> Option<(ContentType, Cow<'static, [u8]>)> {
} }
[".html", "index.html"].iter().find_map(|ext| { [".html", "index.html"].iter().find_map(|ext| {
let p = format!("{}{}", file.display().to_string(), ext); Asset::get(&format!("{}{}", file.display().to_string(), ext))
.map(|a| (ContentType::HTML, a.data))
Asset::get(&p).map(|a| (ContentType::HTML, a.data))
}) })
} }