From 5cb522d78e32a1bad32e0ef3a155da211edc9056 Mon Sep 17 00:00:00 2001 From: iliana etaoin Date: Thu, 6 Apr 2023 12:02:19 -0700 Subject: [PATCH] simplify static routes --- src/app.rs | 10 ++-------- {static => src}/copy.js | 0 {static => src}/site.css | 0 3 files changed, 2 insertions(+), 8 deletions(-) rename {static => src}/copy.js (100%) rename {static => src}/site.css (100%) diff --git a/src/app.rs b/src/app.rs index 6b78fa3..d4bb347 100644 --- a/src/app.rs +++ b/src/app.rs @@ -159,18 +159,12 @@ fn code() -> Code { #[get("/static/site.css")] fn css() -> (ContentType, &'static str) { - ( - ContentType::CSS, - include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/static/site.css")), - ) + (ContentType::CSS, include_str!("site.css")) } #[get("/static/copy.js")] fn copy_js() -> (ContentType, &'static str) { - ( - ContentType::JavaScript, - include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/static/copy.js")), - ) + (ContentType::JavaScript, include_str!("copy.js")) } #[get("/favicon.ico")] diff --git a/static/copy.js b/src/copy.js similarity index 100% rename from static/copy.js rename to src/copy.js diff --git a/static/site.css b/src/site.css similarity index 100% rename from static/site.css rename to src/site.css