From 11b711f878a3fb904a8d59f1ec16d1a891c814e4 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Sat, 11 Mar 2023 17:50:14 -0500 Subject: [PATCH] Cleanup web --- web/src/static_assets.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/src/static_assets.rs b/web/src/static_assets.rs index 88b15af..e907cd5 100644 --- a/web/src/static_assets.rs +++ b/web/src/static_assets.rs @@ -23,8 +23,7 @@ pub(crate) fn dist(file: PathBuf) -> Option<(ContentType, Cow<'static, [u8]>)> { } [".html", "index.html"].iter().find_map(|ext| { - let p = format!("{}{}", file.display().to_string(), ext); - - Asset::get(&p).map(|a| (ContentType::HTML, a.data)) + Asset::get(&format!("{}{}", file.display().to_string(), ext)) + .map(|a| (ContentType::HTML, a.data)) }) }