Make static file links typesafe

This commit is contained in:
Joscha 2023-08-13 20:45:25 +02:00
parent e64ea7ac12
commit 1ead78d44f
4 changed files with 53 additions and 9 deletions

View file

@ -32,3 +32,6 @@ pub async fn static_handler(uri: Uri) -> impl IntoResponse {
let path = uri.path().trim_start_matches('/').to_string();
StaticFile(path)
}
// Constants for each static file, generated by the build script.
include!(concat!(env!("OUT_DIR"), "/static.rs"));