mirror of
https://github.com/perstarkse/minne.git
synced 2026-06-26 11:56:19 +02:00
refactor: harmonized nix ci alignment
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
//! the template middleware renders them with shared layout context. Route composition
|
||||
//! and middleware layering are handled by [`router_factory::RouterFactory`].
|
||||
|
||||
// minijinja_embed output (release builds) triggers these lints.
|
||||
#![allow(unused_variables, clippy::expect_used, clippy::missing_panics_doc)]
|
||||
|
||||
pub mod html_state;
|
||||
pub mod middlewares;
|
||||
pub mod router_factory;
|
||||
|
||||
@@ -22,13 +22,13 @@ macro_rules! create_asset_service {
|
||||
let crate_dir = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
let assets_path = crate_dir.join($relative_path);
|
||||
tracing::debug!("Assets: Serving from filesystem: {:?}", assets_path);
|
||||
tower_http::services::ServeDir::new(assets_path)
|
||||
tower_http::services::ServeDir::new(&assets_path)
|
||||
}
|
||||
#[cfg(not(debug_assertions))]
|
||||
{
|
||||
tracing::debug!("Assets: Serving embedded directory");
|
||||
static ASSETS_DIR: include_dir::Dir<'static> =
|
||||
include_dir::include_dir!("$CARGO_MANIFEST_DIR/assets");
|
||||
tracing::debug!(directory = %$relative_path, "Assets: Serving embedded directory");
|
||||
tower_serve_static::ServeDir::new(&ASSETS_DIR)
|
||||
}
|
||||
}};
|
||||
|
||||
Reference in New Issue
Block a user